﻿<ResourceDictionary
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		
		xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
		xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
		xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"      
		xmlns:navigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"


		xmlns:sys="clr-namespace:System;assembly=mscorlib"
		xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
		xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
		xmlns:telerikChromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
		xmlns:local="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"
		xmlns:dragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
       
>

    <!-- Brushes-->
    <SolidColorBrush x:Key="BasicBrush" telerik:MetroColors.Color="Basic" />
    <SolidColorBrush x:Key="StrongBrush" telerik:MetroColors.Color="Strong" />

    <telerik:Office_BlackTheme x:Key="Theme" />
    <ImageSource x:Key="EditAppointmentTemplate_Recurrence">/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/Recurrence.png</ImageSource>
    <SolidColorBrush x:Key="RadScheduleForeground" Color="Black" />
    <SolidColorBrush x:Key="MonthViewTimeRulerItemForeground_Normal" Color="#FF000000" />
    <SolidColorBrush x:Key="GroupHeaderHeaderOuterBorder" Color="#FF848484" />
    <LinearGradientBrush x:Key="GroupHeaderHeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="White" Offset="0"/>
        <GradientStop Color="#FFCDCDCD" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="MonthViewTimeRulerItemBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFBDA" Offset="0"/>
        <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
        <GradientStop Color="#FFFFD25A" Offset="0.43"/>
        <GradientStop Color="#FFFFFBA3" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="MonthViewTimeRulerItemInnerBorder_MouseOver" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="MonthViewTimeRulerItemForeground_MouseOver" Color="#FF000000" />
    <LinearGradientBrush x:Key="MonthViewTimeRulerItemBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFD74E" Offset="0.996"/>
        <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
        <GradientStop Color="#FFFFB062" Offset="0.57"/>
        <GradientStop Color="#FFFFD18F" Offset="0.56"/>
        <GradientStop Color="#FFFFBA74"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="MonthViewTimeRulerItemInnerBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB69A78"/>
        <GradientStop Color="#FFFFE17A" Offset="0.126"/>
    </LinearGradientBrush>
    <!--<SolidColorBrush x:Key="MonthViewTimeRulerItemInnerBorder" Color="#FFFFFFFF" />-->
    <!--Left Vertical Line (Unit Right Border)-->
    <SolidColorBrush x:Key="MonthViewTimeRulerItemInnerBorder" Color="#FF676364" />
    <SolidColorBrush x:Key="GroupHeaderHeaderOuterBorder_Vertical" Color="#FF303440" />
    <LinearGradientBrush x:Key="GroupHeaderHeaderBackground_Vertical" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="White" Offset="0"/>
        <GradientStop Color="#FFCDCDCD" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="MonthViewTimeRulerItemBackgroundVertical_MouseOver" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="#FFFFFBDA" Offset="0"/>
        <GradientStop Color="#FFFFD25A" Offset="0.43"/>
        <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
        <GradientStop Color="#FFFFFBA3" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="MonthViewTimeRulerItemInnerBorderVertical_MouseOver" Color="#FFFFFFFF" />
    <LinearGradientBrush x:Key="MonthViewTimeRulerItemBackgroundVertical_Pressed" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="#FFFFBA74" Offset="0"/>
        <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
        <GradientStop Color="#FFFE9227" Offset="0.57"/>
        <GradientStop Color="#FFFFD18F" Offset="0.56"/>
        <GradientStop Color="#FFFFD74E" Offset="0.996"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="MonthViewTimeRulerItemInnerBorderVertical_Pressed" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="#FFB69A78"/>
        <GradientStop Color="#FFFFE17A" Offset="0.126"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GroupHeaderHeaderInnerBorder_Vertical" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="MonthViewTimeRulerItemForeground_Today" Color="#FF000000" />
    <LinearGradientBrush x:Key="MonthViewTimeRulerItemOuterBorder_Today" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF282828"/>
        <GradientStop Color="#FF5F5F5F" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="MonthViewTimeRulerItemBackground_Today" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFD74E" Offset="0.996"/>
        <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
        <GradientStop Color="#FFFFB062" Offset="0.57"/>
        <GradientStop Color="#FFFFD18F" Offset="0.56"/>
        <GradientStop Color="#FFFFBA74"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="MonthViewTimeRulerItemBackground_TodayMouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFBDA" Offset="0"/>
        <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
        <GradientStop Color="#FFFFD25A" Offset="0.43"/>
        <GradientStop Color="#FFFFFBA3" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="MonthViewTimeRulerItemInnerBorder_TodayMouseOver" Color="#FFFFFFFF" />
    <LinearGradientBrush x:Key="MonthViewTimeRulerItemBackground_TodayPressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFD74E" Offset="0.996"/>
        <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
        <GradientStop Color="#FFFFB062" Offset="0.57"/>
        <GradientStop Color="#FFFFD18F" Offset="0.56"/>
        <GradientStop Color="#FFFFBA74"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="MonthViewTimeRulerItemInnerBorder_TodayPressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB69A78"/>
        <GradientStop Color="#FFFFE17A" Offset="0.126"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="MonthViewTimeRulerItemInnerBorder_Today" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB69A78"/>
        <GradientStop Color="#FFFFE17A" Offset="0.126"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GroupHeaderHeaderOuterBorder_VerticalToday" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="#FF5F5F5F" Offset="1"/>
        <GradientStop Color="#FF282828"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GroupHeaderHeaderBackground_VerticalToday" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="#FFFFD74E" Offset="0.996"/>
        <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
        <GradientStop Color="#FFFFB062" Offset="0.57"/>
        <GradientStop Color="#FFFFD18F" Offset="0.56"/>
        <GradientStop Color="#FFFFBA74"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GroupHeaderHeaderInnerBorder_VerticalToday" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="#FFB69A78"/>
        <GradientStop Color="#FFFFE17A" Offset="0.126"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="MonthViewExpandOuterBorder_MouseOver" Color="#FFFFC92B" />
    <LinearGradientBrush x:Key="MonthViewExpandButtonBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFBA3" Offset="1"/>
        <GradientStop Color="#FFFFFBDA" Offset="0"/>
        <GradientStop Color="#FFFFD25A" Offset="0.43"/>
        <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="MonthViewExpandInnerBorder_MouseOver" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="MonthViewExpandIconStroke_MouseOver" Color="#FF000000" />
    <LinearGradientBrush x:Key="MonthViewExpandOuterBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF282828"/>
        <GradientStop Color="#FF5F5F5F" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="MonthViewExpandButtonBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFD74E" Offset="0.996"/>
        <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
        <GradientStop Color="#FFFE9227" Offset="0.57"/>
        <GradientStop Color="#FFFFD18F" Offset="0.56"/>
        <GradientStop Color="#FFFFBA74" Offset="0"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="MonthViewExpandInnerBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB69A78"/>
        <GradientStop Color="#FFFFE17A" Offset="0.126"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="MonthViewExpandIconStroke_Pressed" Color="#FF000000" />
    <SolidColorBrush x:Key="MonthViewExpandOuterBorder" Color="#00000000" />
    <SolidColorBrush x:Key="MonthViewExpandButtonBackground" Color="#00000000" />
    <SolidColorBrush x:Key="MonthViewExpandInnerBorder" Color="#00000000" />
    <SolidColorBrush x:Key="MonthViewExpandIconStroke" Color="#FF000000" />
    <SolidColorBrush x:Key="TimeRulerGroupItemForeground" Color="#FF000000" />
    <SolidColorBrush x:Key="TimeRulerItemMajorTickStroke" Color="#FFCBCBCB" />
    <SolidColorBrush x:Key="TimeRulerItemMinorTickStroke" Color="#FFCBCBCB" />
    <SolidColorBrush x:Key="TimeRulerItemMajorTickStroke_Vertical" Color="#FFCBCBCB" />
    <SolidColorBrush x:Key="TimeRulerItemMinorTickStroke_Vertical" Color="#FFCBCBCB" />
    <SolidColorBrush x:Key="TimeRulerLineStroke" Color="#FFCBCBCB" />
    <SolidColorBrush x:Key="GroupHeaderBorderBrush_Today" Color="#FFFFC92B" />
    <Thickness x:Key="HorizontalGroupHeaderTodayBorderThickness">2 0 2 2</Thickness>
    <SolidColorBrush x:Key="GroupHeaderBorderBrush" Color="#FF676364" />
    <SolidColorBrush x:Key="HorizontalBottomLevelTodayForeground" Color="#FF000000" />
    <LinearGradientBrush x:Key="AppointmentItemBackground_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFCE79F" Offset="1"/>
        <GradientStop Color="#FFFDD3A8"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="AppointmentItemOuterBorder_Selected" Color="#FF676364" />
    <SolidColorBrush x:Key="AppointmentItemInnerBorder_Selected" Color="#FF676364" />
    <SolidColorBrush x:Key="AppointmentItemOuterBorder" Color="#FF676364" />
    <SolidColorBrush x:Key="AppointmentItemInnerBorder" Color="#FF676364" />
    <LinearGradientBrush x:Key="AppointmentItemBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFBA3" Offset="1"/>
        <GradientStop Color="#FFFFFBDA" Offset="0"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="AppointmentItemOuterBorder_MouseOver" Color="#FFFFC92B" />
    <SolidColorBrush x:Key="AppointmentItemInnerBorder_MouseOver" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="AppoinmtentItemBackground_ReadOnly" Color="#B2BABFC6" />
    <SolidColorBrush x:Key="AppointmentItemIndicatorFill" Color="#FF000000" />
    <ImageSource x:Key="AppointmentItem_Recurrence">/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/AppointmentException.png</ImageSource>
    <ImageSource x:Key="AppointmentItem_Exception">/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/AppointmentRecurrence.png</ImageSource>
    <SolidColorBrush x:Key="AppointmentItemResizeGripBackground" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="AppointmentItemResizeGripStroke" Color="#FF444444" />
    <SolidColorBrush x:Key="AppointmentItemDeleteIconStroke" Color="#FF444444" />
    <LinearGradientBrush x:Key="AppointmentItemBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="White"/>
        <GradientStop Color="#FFD4D4D4" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="AppointmentItemBackground_Drag" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#AAFFFFFF"/>
        <GradientStop Color="#AAD4D4D4" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="AppointmentItemOuterBorder_Drag" Color="#AA848484" />
    <SolidColorBrush x:Key="AppointmentItemInnerBorder_Drag" Color="#AAFFFFFF" />
    <SolidColorBrush x:Key="DecorationRectangleBackground" Color="#99FCE7AD" />
    <SolidColorBrush x:Key="DecorationRectangleBackground_DragOver" Color="#99FCE7AD" />
    <SolidColorBrush x:Key="DecorationRectangleOuterBorder_DragOver" Color="#FF848484" />
    <SolidColorBrush x:Key="DecorationRectangleInnerBorder_DragOver" Color="#99FFFFFF" />
    <LinearGradientBrush x:Key="AppointmentResizeCueTopLeftMarkStroke" StartPoint="0 0" EndPoint="1 1">
        <GradientStop Offset="0.33" Color="#FF000000" />
        <GradientStop Offset="1" Color="#00000000" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="AppointmentResizeCueBottomRightMarkStroke" StartPoint="1 1" EndPoint="0 0">
        <GradientStop Offset="0.33" Color="#FF000000" />
        <GradientStop Offset="1" Color="#00000000" />
    </LinearGradientBrush>
    <!--Dhilip-->
    <!--<SolidColorBrush x:Key="DecorationRectangleBackground_MouseOver" Color="#FFFFFBD1" />-->
    <SolidColorBrush x:Key="DecorationRectangleBackground_MouseOver" Color="Black" />
    <SolidColorBrush x:Key="DecorationRectangleOuterBorder_MouseOver" Color="#FF676364" />
    <SolidColorBrush x:Key="DecorationRectangleInnerBorder_MouseOver" Color="Black" />
    <SolidColorBrush x:Key="DecorationRectangleBackground_Selected" Color="Black" />
    <SolidColorBrush x:Key="DecorationRectangleOuterBorder_Selected" Color="Black" />
    <SolidColorBrush x:Key="DecorationRectangleInnerBorder_Selected" Color="Black" />
    <SolidColorBrush x:Key="SpecialSlotBackground" Color="#334F4F4F" />
    <SolidColorBrush x:Key="SpecialSlotBackground_ReadOnly" Color="#6B4F4F4F" />
    <SolidColorBrush x:Key="ViewModeButtonForeground" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="ViewModeButtonForeground_MouseOver" Color="#FF000000" />
    <SolidColorBrush x:Key="ViewModeButtonOuterBorder_MouseOver" Color="#FFFFC92B" />
    <LinearGradientBrush x:Key="ViewModeButtonBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFBA3" Offset="1"/>
        <GradientStop Color="#FFFFFBDA" Offset="0"/>
        <GradientStop Color="#FFFFD25A" Offset="0.43"/>
        <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ViewModeButtonInnerBorder_MouseOver" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="ViewModeButtonForeground_Pressed" Color="#FF000000" />
    <LinearGradientBrush x:Key="ViewModeButtonOuterBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF282828"/>
        <GradientStop Color="#FF5F5F5F" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ViewModeButtonBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFD74E" Offset="0.996"/>
        <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
        <GradientStop Color="#FFFE9227" Offset="0.57"/>
        <GradientStop Color="#FFFFD18F" Offset="0.56"/>
        <GradientStop Color="#FFFFBA74" Offset="0"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ViewModeButtonInnerBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB69A78"/>
        <GradientStop Color="#FFFFE17A" Offset="0.126"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ViewModeButtonOuterBorder" Color="#FF848484" />
    <SolidColorBrush x:Key="ViewModeButtonBackground" Color="#00000000" />
    <SolidColorBrush x:Key="ViewModeButtonInnerBorder" Color="#00000000" />
    <SolidColorBrush x:Key="NavigationIconForeground_Highlighted" Color="#FF000000" />
    <SolidColorBrush x:Key="NavigationIconBackground_Highlighted" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="NavigationIconBackground_Normal" Color="#FF000000" />
    <SolidColorBrush x:Key="NavigationIconForeground_Normal" Color="#FFFFFFFF" />
    <ControlTemplate x:Key="CalendarIcon" TargetType="ContentControl">
        <Grid>
            <Path x:Name="CalendarIconBackground" Width="7" Height="7" Margin="0 1 0 0" Stroke="{TemplateBinding Background}" Data="M0,0.5 L7,0.5 M0,2.5 L7,2.5 M0,4.5 L7,4.5 M0,6.5 L7,6.5 M0.5,0 L0.5,7 M2.5,0 L2.5,7 M4.5,0 L4.5,7 M6.5,0 L6.5,7" />
            <Path x:Name="CalendarIconForeground" Width="7" Height="7" Margin="0 0 0 1" Stroke="{TemplateBinding Foreground}" Data="M0,0.5 L7,0.5 M0,2.5 L7,2.5 M0,4.5 L7,4.5 M0,6.5 L7,6.5 M0.5,0 L0.5,7 M2.5,0 L2.5,7 M4.5,0 L4.5,7 M6.5,0 L6.5,7" />
        </Grid>
    </ControlTemplate>
    <SolidColorBrush x:Key="NavigationIntervalForegroundRear" Color="#FF000000" />
    <SolidColorBrush x:Key="NavigationIntervalForegroundFront" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="DragVisualForeground" Color="Black" />
    <SolidColorBrush x:Key="DragVisualBorder" Color="#FF848484" />
    <LinearGradientBrush x:Key="DragVisualBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="White" Offset="0"/>
        <GradientStop Color="#FFDEDEDE" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="DragVisualMultyItemBorder" Color="#FF848484" />
    <SolidColorBrush x:Key="DragVisualMultyItemBackground" Color="White" />
    <SolidColorBrush x:Key="DragVisualEffectImportant" Color="#FFDC000C" />
    <SolidColorBrush x:Key="DragVisualEffectNormal" Color="#FF848484" />
    <SolidColorBrush x:Key="SchedulerHeaderOuterBorder" Color="#FFB5B5B5" />
    <LinearGradientBrush x:Key="SchedulerHeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF868686"/>
        <GradientStop Color="#FF4F4F4F" Offset="0.5"/>
        <GradientStop Color="#FF0E0E0E" Offset="0.5"/>
        <GradientStop Color="#FF5B5B5B" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="SchedulerHeaderInnerBorder" Color="Transparent" />
    <SolidColorBrush x:Key="CurrentTimeFill" Color="#FFFFC92B" />
    <LinearGradientBrush x:Key="RedCategoryBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFE8807D" Offset="0" />
        <GradientStop Color="#FFF7D4D2" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GreenCategoryBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF99CC66" Offset="0" />
        <GradientStop Color="#FFCCFF99" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="BlueCategoryBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF6C92BF" Offset="0" />
        <GradientStop Color="#FFC3D6EC" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="PurpleCategoryBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB687B8" Offset="0" />
        <GradientStop Color="#FFE9D7EB" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="YellowCategoryBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFD351" Offset="0" />
        <GradientStop Color="#FFFFFF99" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="OliveCategoryBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFA3AD70" Offset="0" />
        <GradientStop Color="#FFE5F0CA" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="PinkCategoryBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFCE66A2" Offset="0" />
        <GradientStop Color="#FFF8A2D3" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="OrangeCategoryBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFF57238" Offset="0" />
        <GradientStop Color="#FFFFCC00" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="FreeMarkerBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF00C800" Offset="0" />
        <GradientStop Color="#FF1E841E" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush EndPoint="9,9" x:Key="TentativeMarkerBrush" StartPoint="2,2" SpreadMethod="Repeat" MappingMode="Absolute">
        <GradientStop Color="#FF05529D" Offset="0" />
        <GradientStop Color="#FF05529D" Offset="1" />
        <GradientStop Color="White" Offset="0.25" />
        <GradientStop Color="#FF05529D" Offset="0.5" />
        <GradientStop Color="White" Offset="0.741" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="BusyMarkerBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFF0606" />
        <GradientStop Color="#FFBF0303" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="OutOfOfficeMarkerBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFF1A202" Offset="1" />
        <GradientStop Color="#FFFFF502" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RadScheduleBackground" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="RadScheduleBorderBrush" Color="#00FFFFFF" />

    <Thickness x:Key="WindowButtonPadding">4</Thickness>
    <Thickness x:Key="WindowButtonMargin">1 1 0 1</Thickness>
    <CornerRadius x:Key="SplitButton_SpanCornerRadius">1</CornerRadius>
    <SolidColorBrush x:Key="WindowInnerBorder" Color="#FFFFFFFF" />
    <LinearGradientBrush x:Key="WindowHeaderBackground" StartPoint="0 0" EndPoint="0 1">
        <GradientStop Color="#FFFFFFFF" Offset="0"/>
        <GradientStop Color="#FFD5D5D5" Offset="0.5"/>
        <GradientStop Color="#FFA1A1A1" Offset="0.5"/>
        <GradientStop Color="#FFEAEAEA" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="WindowButtonIconFill" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF282828"/>
        <GradientStop Color="#FF7C7C7C" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="WindowButtonIconStroke" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="WindowBackground" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="WindowOuterBorder" Color="#FF848484" />
    <SolidColorBrush x:Key="WindowBorderBackground" Color="#FFEAEAEA" />
    <LinearGradientBrush x:Key="WindowModalBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#E5000000" />
        <GradientStop Color="#4C000000" Offset="0.5" />
        <GradientStop Color="#E5000000" Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="BorderLineOuterColor" Color="#26000000" />
    <SolidColorBrush x:Key="BorderLineInnerColor" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="ControlOuterBorder_Disabled" Color="#FF989898" />
    <SolidColorBrush x:Key="ButtonIconForeground_Disabled" Color="#FF8D8D8D" />
    <SolidColorBrush x:Key="ButtonIconBackground_Disabled" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="ControlBackground_Disabled" Color="#FFE0E0E0" />
    <SolidColorBrush x:Key="ButtonIconForeground_MouseOver" Color="#FF000000" />
    <SolidColorBrush x:Key="ButtonIconBackground_MouseOver" Color="#FFFFFFFF" />
    <LinearGradientBrush x:Key="ControlOuterBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF282828"/>
        <GradientStop Color="#FF5F5F5F" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ButtonIconForeground_Pressed" Color="#FF000000" />
    <SolidColorBrush x:Key="ButtonIconBackground_Pressed" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="PickerBackground_Normal" Color="#FFFFFFFF" />
    <CornerRadius x:Key="SplitButton_LeftPartCornerRadius">1 0 0 1</CornerRadius>
    <SolidColorBrush x:Key="ControlOuterBorder_MouseOver" Color="#FFFFC92B" />
    <SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#FFFFC92B" />
    <SolidColorBrush x:Key="ControlInnerBorder_Focused" Color="Transparent" />
    <CornerRadius x:Key="SplitButton_SpanInnerCornerRadius">0</CornerRadius>
    <CornerRadius x:Key="SplitButton_RightPartCornerRadius">0 1 1 0</CornerRadius>
    <SolidColorBrush x:Key="ButtonIconForeground_Normal" Color="#FF000000" />
    <SolidColorBrush x:Key="ButtonIconBackground_Normal" Color="#FFFFFFFF" />
    <ControlTemplate x:Key="ArrowTemplateEditableCombobox" TargetType="ContentControl">
        <Grid Margin="5 0">
            <Path x:Name="BackgroundIcon" Data="M0,0 L2,0 1,1 Z" Stretch="Fill" Width="5" Height="3" Fill="{TemplateBinding Background}" Margin="0 2 0 0" />
            <Path x:Name="ForegroundIcon" Data="M0,0 L2,0 1,1 Z" Stretch="Fill" Width="5" Height="3" Fill="{TemplateBinding Foreground}" Margin="0 1 0 1" />
        </Grid>
    </ControlTemplate>
    <SolidColorBrush x:Key="PickerPopupBackground" Color="#FFFFFFFF" />
    <ControlTemplate x:Key="ArrowTemplateNonEditableCombobox" TargetType="ContentControl">
        <Grid Margin="5 0">
            <Path x:Name="BackgroundIcon" Data="M0,0 L2,0 1,1 Z" Stretch="Fill" Width="5" Height="3" Fill="{TemplateBinding Background}" Margin="0 2 0 0" />
            <Path x:Name="ForegroundIcon" Data="M0,0 L2,0 1,1 Z" Stretch="Fill" Width="5" Height="3" Fill="{TemplateBinding Foreground}" Margin="0 1 0 1" />
        </Grid>
    </ControlTemplate>
    <SolidColorBrush x:Key="ControlOuterBorder_Highlighted" Color="#FFFFC92B" />
    <LinearGradientBrush x:Key="ControlBackground_Highlighted" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFBDA" Offset="0"/>
        <GradientStop Color="#FFFFFBA3" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlInnerBorder_Highlighted" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="PickerForeground_Normal" Color="#FF000000" />
    <SolidColorBrush x:Key="ControlOuterBorder_Normal" Color="#FF848484" />


    <!-- RadScheduleView-->


    <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter" />
    <local:InvertedNullToVisibilityConverter x:Key="InvertedNullToVisibilityConverter" />
    <local:InvertedVisibilityConverter x:Key="InvertedVisibilityConverter" />
    <telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
    <local:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
    <local:BoolToInputModeConverter x:Key="BoolToInputModeConverter" />
    <local:ResourcesSeparatorConverter x:Key="ResourcesSeparatorConverter" />
    <local:EnumToBooleanConverter x:Key="EnumToBoolConverter" />
    <local:EnumToVisibilityConverter x:Key="EnumToVisibilityConverter" />
    <!-- Dhilip 26-11-2012 InvertedBooleanConverter-->
    <!--<telerik:InvertedBooleanConverter x:Key="InvertedBooleanConverter" />-->
    <local:RecurrenceStateIsExeptionToVisibilityConverter x:Key="RecurrenceStateIsExeptionToVisibilityConverter" />
    <local:RecurrenceStateIsOccurenceToVisibilityConverter x:Key="RecurrenceStateIsOccurenceToVisibilityConverter" />

    <local:DraggedAppointmentsToLocalizedStringConverter x:Key="DraggedAppointmentsToLocalizedStringConverter" />
    <local:EnumerableCountToVisibilityConverter x:Key="EnumerableCountToVisibilityConverter" />

    <telerik:LocalizationManager x:Key="LocalizationManager"/>

    <!-- Styles and Templates -->

    <!-- DIALOGS >> -->
    <!--EditAppointmentStyle-->
    <local:ResourceTypeTemplateSelector x:Key="ResourcesEditorItemTemplateSelector">
        <local:ResourceTypeTemplateSelector.SingleSelectionTemplate>
            <DataTemplate>
                <Grid>
                    <Grid.ColumnDefinitions>

                        <ColumnDefinition Width="120" />


                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="{Binding ResourceType.DisplayName}" Margin="6" />
                    <telerik:RadComboBox Grid.Column="1" Margin="3" ItemsSource="{Binding ResourceItems}" ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="{Binding ClearAllButtonContent}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}" DisplayMemberPath="Resource.DisplayName" telerik:StyleManager.Theme="{StaticResource Theme}" />
                </Grid>
            </DataTemplate>
        </local:ResourceTypeTemplateSelector.SingleSelectionTemplate>
        <local:ResourceTypeTemplateSelector.MultipleSelectionTemplate>
            <DataTemplate>
                <Grid>
                    <Grid.ColumnDefinitions>

                        <ColumnDefinition Width="120" />


                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="{Binding ResourceType.DisplayName}" Margin="6" />
                    <telerik:RadComboBox Grid.Column="1" Margin="3" ItemsSource="{Binding ResourceItems}" ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="{Binding ClearAllButtonContent}" SelectedIndex="{Binding SelectedIndex, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}">
                        <telerik:RadComboBox.ItemContainerStyle>
                            <Style TargetType="telerik:RadComboBoxItem">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate>
                                            <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Resource.DisplayName}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </telerik:RadComboBox.ItemContainerStyle>
                        <telerik:RadComboBox.SelectionBoxTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Owner.CheckedItems, Converter={StaticResource ResourcesSeparatorConverter}}" />
                            </DataTemplate>
                        </telerik:RadComboBox.SelectionBoxTemplate>
                    </telerik:RadComboBox>
                </Grid>
            </DataTemplate>
        </local:ResourceTypeTemplateSelector.MultipleSelectionTemplate>
    </local:ResourceTypeTemplateSelector>
    <DataTemplate x:Key="TimeMarkerComboBoxItemContentTemplate">
        <StackPanel Orientation="Horizontal">
            <Rectangle Fill="{Binding TimeMarkerBrush}" Margin="2 0" Width="12" Height="12" />
            <TextBlock telerik:LocalizationManager.ResourceKey="{Binding TimeMarkerName}" Margin="2 0" />
        </StackPanel>
    </DataTemplate>
    <DataTemplate x:Key="CategoryComboBoxItemContentTemplate">
        <StackPanel Orientation="Horizontal">
            <Rectangle Fill="{Binding CategoryBrush}" Margin="2 0" Width="12" Height="12" />
            <TextBlock Text="{Binding DisplayName}" Margin="2 0" />
        </StackPanel>
    </DataTemplate>
    <ControlTemplate x:Key="EditAppointmentTemplate" TargetType="local:SchedulerDialog">
        <Grid  >
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <!-- Visibility=Collapsed to hide the appointment toolbar by Dhilip by 05-10-2012 --> 
            <telerik:RadToolBar x:Name="AppointmentToolbar" Visibility="Collapsed"  GripVisibility="Collapsed" Grid.Row="0" Margin="-1 -1 -1 3" telerik:StyleManager.Theme="{StaticResource Theme}">
                <telerik:RadButton x:Name="EditRecurrenceButton" 
								   
					
					Command="local:RadScheduleViewCommands.EditRecurrenceRule"
					

					Visibility="{Binding CanEditParentAppointment, Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
                    <ToolTipService.ToolTip>
                        <ToolTip telerik:LocalizationManager.ResourceKey="EditRecurrence" telerik:StyleManager.Theme="{StaticResource Theme}" />
                    </ToolTipService.ToolTip>
                    <StackPanel Orientation="Horizontal" Margin="2 0">
                        <Image Margin="2 0" Stretch="None" Source="{StaticResource EditAppointmentTemplate_Recurrence}"  />
                        <TextBlock Margin="4 0" telerik:LocalizationManager.ResourceKey="EditRecurrence" Foreground="{StaticResource RadScheduleForeground}" />
                    </StackPanel>
                </telerik:RadButton>
                <!-- Dhilip 26-11-2012 InvertedBooleanConverter-->
                <!--<telerik:RadButton x:Name="EditParentAppointmentButton" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" 
					
					
					Command="local:RadScheduleViewCommands.EditParentAppointment"
					
					Visibility="{Binding CanEditParentAppointment, Converter={StaticResource BooleanToVisibilityConverter}}">
                    <ToolTipService.ToolTip>
                        <TextBlock telerik:LocalizationManager.ResourceKey="EditParentAppointment" telerik:StyleManager.Theme="{StaticResource Theme}" />
                    </ToolTipService.ToolTip>
                    <TextBlock Margin="4 0" telerik:LocalizationManager.ResourceKey="EditParentAppointment" Foreground="{StaticResource RadScheduleForeground}" />
                </telerik:RadButton>-->
                <telerik:RadToolBarSeparator />
                <TextBlock x:Name="ShowAs" telerik:LocalizationManager.ResourceKey="ShowAs" Margin="1 0 1 1" VerticalAlignment="Center" Foreground="{StaticResource RadScheduleForeground}" />
                <!-- Dhilip 26-11-2012 InvertedBooleanConverter-->
                <!--<telerik:RadComboBox x:Name="PART_TimeMarkers" Margin="2 1" Width="110" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" EmptyText="{Binding TimeMarkersEmptyText}" ItemsSource="{Binding TimeMarkers}" SelectedItem="{Binding Occurrence.Appointment.TimeMarker, Mode=TwoWay}" ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="{Binding ClearSelectionButtonContent}" ItemTemplate="{StaticResource TimeMarkerComboBoxItemContentTemplate}" SelectionBoxTemplate="{StaticResource TimeMarkerComboBoxItemContentTemplate}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                <telerik:RadComboBox x:Name="PART_Categories" Margin="2 1" Width="120" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" EmptyText="{Binding CategoriesEmptyText}" ItemsSource="{Binding Categories}" SelectedItem="{Binding Occurrence.Appointment.Category, Mode=TwoWay}" ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="{Binding ClearSelectionButtonContent}" ItemTemplate="{StaticResource CategoryComboBoxItemContentTemplate}" SelectionBoxTemplate="{StaticResource CategoryComboBoxItemContentTemplate}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                <telerik:RadToggleButton x:Name="HighImportaceButton" Width="22" Height="22" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" IsChecked="{Binding IsHighImportance, Mode=TwoWay}">
                    <ToolTipService.ToolTip>
                        <ToolTip telerik:LocalizationManager.ResourceKey="HighImportance" telerik:StyleManager.Theme="{StaticResource Theme}" />
                    </ToolTipService.ToolTip>
                    <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Path Stretch="Fill" Height="10" HorizontalAlignment="Center" Width="5.451" Data="M200.39647,58.840393 C200.39337,58.336426 201.14566,57.683922 202.56244,57.684292 C204.06589,57.684685 204.73764,58.357765 204.72783,58.992363 C205.04649,61.795574 203.04713,64.181099 202.47388,66.133446 C201.93753,64.154961 199.9471,61.560352 200.39647,58.840393 z">
                            <Path.Fill>
                                <LinearGradientBrush EndPoint="1.059,0.375" StartPoint="-0.457,0.519">
                                    <GradientStop Color="#FFFF0606" Offset="0.609" />
                                    <GradientStop Color="#FFBF0303" Offset="0.927" />
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>
                        <Ellipse Width="3" Height="3" HorizontalAlignment="Center">
                            <Ellipse.Fill>
                                <RadialGradientBrush>
                                    <GradientStop Color="#FFFF0606" Offset="0" />
                                    <GradientStop Color="#FFBF0303" Offset="1" />
                                </RadialGradientBrush>
                            </Ellipse.Fill>
                        </Ellipse>
                    </StackPanel>
                </telerik:RadToggleButton>
                <telerik:RadToggleButton x:Name="LowImportaceButton" Width="22" Height="22" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" IsChecked="{Binding IsLowImportance, Mode=TwoWay}">
                    <ToolTipService.ToolTip>
                        <ToolTip telerik:LocalizationManager.ResourceKey="LowImportance" telerik:StyleManager.Theme="{StaticResource Theme}" />
                    </ToolTipService.ToolTip>
                    <Path Stretch="Fill" Height="12" HorizontalAlignment="Center" VerticalAlignment="Center" Width="9" Stroke="#FF0365A7" Data="M222.40353,60.139881 L226.65768,60.139843 L226.63687,67.240196 L229.15347,67.240196 L224.37816,71.394943 L219.65274,67.240196 L222.37572,67.219345 z">
                        <Path.Fill>
                            <LinearGradientBrush EndPoint="1.059,0.375" StartPoint="-0.457,0.519">
                                <GradientStop Color="#FFBBE4FF" />
                                <GradientStop Color="#FF024572" Offset="0.836" />
                                <GradientStop Color="#FF43ADF4" Offset="0.466" />
                            </LinearGradientBrush>
                        </Path.Fill>
                    </Path>
                </telerik:RadToggleButton>-->
            </telerik:RadToolBar>
            <Border x:Name="AppointmentCategory" Grid.Row="1" Height="20" Margin="6 6" CornerRadius="3" Background="{Binding SelectedItem.CategoryBrush, ElementName=PART_Categories}" Visibility="{Binding SelectedItem, ElementName=PART_Categories,Converter={StaticResource NullToVisibilityConverter}}">
                <TextBlock Margin="6 0" Text="{Binding SelectedItem.DisplayName, ElementName=PART_Categories}" VerticalAlignment="Center"  />
            </Border>

            <Grid x:Name="Details" Grid.Row="2" Margin="6">
                <Grid.Resources>
                    <telerik:InputMode x:Key="RadDateTimePickerInputModeDatePicker">DatePicker</telerik:InputMode>
                </Grid.Resources>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>

                    <ColumnDefinition Width="120" />


                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                <TextBlock	Grid.Row="0" Grid.Column="0" Margin="6" telerik:LocalizationManager.ResourceKey="Subject"  />
                <TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Margin="3" IsReadOnly="{Binding IsReadOnly}" Text="{Binding Occurrence.Appointment.Subject, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />

                <TextBlock	Grid.Row="1" Grid.Column="0" Margin="6" telerik:LocalizationManager.ResourceKey="Body" />
                <TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="3" Height="70" IsEnabled="{Binding Occurrence.Appointment.IsDescEnabled}" IsReadOnly="{Binding IsReadOnly}" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch" VerticalScrollBarVisibility="Visible" Text="{Binding Occurrence.Appointment.Body,ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" TextWrapping="Wrap" telerik:StyleManager.Theme="{StaticResource Theme}"  />

                <TextBlock	Grid.Row="2" Grid.Column="0" Margin="6" telerik:LocalizationManager.ResourceKey="StartTime" />


                <telerik:RadDateTimePicker Grid.Row="2" Grid.Column="1" Margin="3" IsReadOnly="{Binding IsReadOnly}" Culture="{Binding DefaultCulture,Source={StaticResource LocalizationManager}}" SelectedValue="{Binding  ActualStart, Mode=TwoWay, ValidatesOnDataErrors=true, NotifyOnValidationError=true}" IsEnabled="{Binding IsNotRecurrent}" telerik:StyleManager.Theme="{StaticResource Theme}">
                    <telerik:RadDateTimePicker.InputMode>
                        <Binding Path="IsAllDayEvent" Converter="{StaticResource BoolToInputModeConverter}">
                            <Binding.ConverterParameter>
                                <telerik:InputMode>DatePicker</telerik:InputMode>
                            </Binding.ConverterParameter>
                        </Binding>
                    </telerik:RadDateTimePicker.InputMode>
                </telerik:RadDateTimePicker>


                <TextBlock	Grid.Row="3" Grid.Column="0" Margin="6" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="EndTime"  telerik:StyleManager.Theme="{StaticResource Theme}" />


                <telerik:RadDateTimePicker Grid.Row="3" Grid.Column="1" Margin="3" IsReadOnly="{Binding IsReadOnly}" Culture="{Binding DefaultCulture,Source={StaticResource LocalizationManager}}" SelectedValue="{Binding ActualEnd,ValidatesOnDataErrors=true, NotifyOnValidationError=true, Mode=TwoWay}" IsEnabled="{Binding IsNotRecurrent}" telerik:StyleManager.Theme="{StaticResource Theme}">
                    <telerik:RadDateTimePicker.InputMode>
                        <Binding Path="IsAllDayEvent" Converter="{StaticResource BoolToInputModeConverter}">
                            <Binding.ConverterParameter>
                                <telerik:InputMode>DatePicker</telerik:InputMode>
                            </Binding.ConverterParameter>
                        </Binding>
                    </telerik:RadDateTimePicker.InputMode>
                </telerik:RadDateTimePicker>

                <!-- Commented by Dhilip to add Custom properties-->
                <!--<CheckBox x:Name="AllDayEventCheckbox" Grid.Row="4"  Grid.Column="1" Margin="3" VerticalAlignment="Center" 
                          IsChecked="{Binding Path=IsAllDayEvent, Mode=TwoWay}" IsEnabled="{Binding IsNotRecurrent}" telerik:LocalizationManager.ResourceKey="AllDayEvent" telerik:StyleManager.Theme="{StaticResource Theme}" />-->

                <!--<TextBlock Grid.Row="4" Grid.Column="0" Margin="6" Text="Task Id" />
                <TextBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Margin="3" IsReadOnly="{Binding IsReadOnly}"  Text="{Binding Occurrence.Appointment.TaskId, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />-->
                <!--<TextBlock Grid.Row="4" Grid.Column="0" Margin="6" Text="Task Name" />
                <TextBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Margin="3" IsReadOnly="{Binding IsReadOnly}"  Text="{Binding Occurrence.Appointment.TaskName, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />-->
            </Grid>

            <!-- Resource Editor -->
            <!-- Commented by Dhilip to hide resourceType dropdown -->
            <!--<Grid Grid.Row="3" Margin="3" Visibility="{Binding ResourceTypesVisibility}">-->

            <Grid Grid.Row="3" Margin="3" Visibility="Collapsed">
                <!-- Dhilip 26-11-2012 InvertedBooleanConverter-->
                <!--<telerik:ItemsControl x:Name="PART_Resources" Margin="3" IsTabStop="false" BorderBrush="{x:Null}" BorderThickness="0" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" ItemsSource="{Binding ResourceTypes}" ItemTemplateSelector="{StaticResource ResourcesEditorItemTemplateSelector}" Visibility="{Binding ResourceTypesVisibility}" />-->
                <TextBlock HorizontalAlignment="Center" Text="You can only change the resources by opening the series" Margin="3" Visibility="{Binding ResourceTypesVisibility, Converter={StaticResource InvertedVisibilityConverter}}" />
            </Grid>

            <StackPanel Grid.Row="4" Margin="13 6" HorizontalAlignment="Right" Orientation="Horizontal">
                <telerik:RadButton Margin="2" MinWidth="84" 
								   
					
					Command="telerik:WindowCommands.Confirm"
					
								   telerik:LocalizationManager.ResourceKey="Ok" telerik:RadWindow.ResponseButton="Accept" telerik:StyleManager.Theme="{StaticResource Theme}">
                    <ToolTipService.ToolTip>
                        <TextBlock telerik:LocalizationManager.ResourceKey="SaveAndClose" telerik:StyleManager.Theme="{StaticResource Theme}" />
                    </ToolTipService.ToolTip>
                </telerik:RadButton>
                <telerik:RadButton Margin="2" MinWidth="84"
					
					Command="telerik:WindowCommands.Cancel"
					 telerik:LocalizationManager.ResourceKey="Cancel" telerik:RadWindow.ResponseButton="Cancel" telerik:StyleManager.Theme="{StaticResource Theme}" />
            </StackPanel>
        </Grid>
    </ControlTemplate>

    <Style x:Key="EditAppointmentDialogStyle" TargetType="local:SchedulerDialog">
        <Setter Property="Foreground" Value="{StaticResource RadScheduleForeground}" />
        <Setter Property="Width" Value="560" />
        <Setter Property="IsTabStop" Value="False" />

        <Setter Property="Template" Value="{StaticResource EditAppointmentTemplate}" />
        <Setter Property="HeaderTemplate">
            <Setter.Value>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" MaxWidth="400" HorizontalAlignment="Left">
                        <TextBlock telerik:LocalizationManager.ResourceKey="Event" Visibility="{Binding Occurrence.Appointment.IsAllDayEvent, Converter={StaticResource BooleanToVisibilityConverter}}" />
                        <TextBlock telerik:LocalizationManager.ResourceKey="Activity" Visibility="{Binding Occurrence.Appointment.IsAllDayEvent, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" />
                        <TextBlock Text=" - " />
                        <TextBlock x:Name="SubjectTextBlock" Text="{Binding Occurrence.Appointment.Subject}" Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource NullToVisibilityConverter}}" />
                        <TextBlock telerik:LocalizationManager.ResourceKey="Untitled" Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource InvertedNullToVisibilityConverter}}" />
                    </StackPanel>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="IconTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Image Stretch="None" Source="/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/EditAppointment.png"  />
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--EditRecurrenceStyle-->
    <Style x:Key="RepeatSelectionTabItemControlStyle"  TargetType="telerik:RadTabItem">
        <Setter Property="Margin" Value="3" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadTabItem">
                    <RadioButton IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}">
                        <ContentPresenter  telerik:LocalizationManager.ResourceKey="{TemplateBinding Header}"/>
                    </RadioButton>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RepeatSelectionTabControlStyle" TargetType="telerik:RadTabControl">
        <Setter Property="TabStripPlacement" Value="Top" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource RepeatSelectionTabItemControlStyle}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadTabControl">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <ItemsPresenter Grid.Column="0" Margin="3 6 30 6" VerticalAlignment="Center" />
                        <telerik:RadTransitionControl x:Name="ContentElement" Grid.Column="1" IsTabStop="False" Duration="0:0:0.200" 
													  Content="{TemplateBinding SelectedContent}" 
													  ContentTemplate="{TemplateBinding SelectedContentTemplate}">
                            <telerik:RadTransitionControl.Transition>
                                <telerik:SlideAndZoomTransition />
                            </telerik:RadTransitionControl.Transition>
                        </telerik:RadTransitionControl>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="EditRecurrenceTemplate" TargetType="local:SchedulerDialog">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <telerik:GroupBox x:Name="StartEndTimes" Margin="3" telerik:LocalizationManager.ResourceKey="AppointmentTime" telerik:StyleManager.Theme="{StaticResource Theme}">
                <Grid HorizontalAlignment="Center">
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <!-- Dhilip 26-11-2012 InvertedBooleanConverter-->
                    <!--<telerik:Label Grid.Row="0" Grid.Column="0" MinWidth="65" VerticalAlignment="Center" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" Target="{Binding ElementName=StartTimePicker}" telerik:LocalizationManager.ResourceKey="StartColon" telerik:StyleManager.Theme="{StaticResource Theme}" />
                    <telerik:RadDateTimePicker x:Name="StartTimePicker" Grid.Row="0" Grid.Column="1" Margin="3" Width="120" IsReadOnly="{Binding IsReadOnly}" SelectedValue="{Binding Start, Mode=TwoWay}" InputMode="TimePicker" Culture="{Binding DefaultCulture,Source={StaticResource LocalizationManager}}" telerik:StyleManager.Theme="{StaticResource Theme}" />

                    <telerik:Label Grid.Row="1" Grid.Column="0" MinWidth="65" VerticalAlignment="Center" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" Target="{Binding ElementName=EndTimePicker}" telerik:LocalizationManager.ResourceKey="EndColon" telerik:StyleManager.Theme="{StaticResource Theme}" />
                    <telerik:RadDateTimePicker x:Name="EndTimePicker" Grid.Row="1" Grid.Column="1" Margin="3" Width="120" IsReadOnly="{Binding IsReadOnly}" SelectedValue="{Binding End, Mode=TwoWay}" InputMode="TimePicker" Culture="{Binding DefaultCulture,Source={StaticResource LocalizationManager}}" telerik:StyleManager.Theme="{StaticResource Theme}" />

                    <telerik:Label Grid.RowSpan="2" Grid.Column="2" MinWidth="65" VerticalAlignment="Center" Margin="18 0 0 0" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" Target="{Binding ElementName=DurationPicker}" telerik:LocalizationManager.ResourceKey="DurationColon" telerik:StyleManager.Theme="{StaticResource Theme}" />
                    <local:DurationPicker x:Name="DurationPicker" Grid.RowSpan="2" Grid.Column="3" Margin="3" Width="120" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" VerticalAlignment="Center"  SelectedDuration="{Binding Path=Duration, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />-->

                </Grid>
            </telerik:GroupBox>
            <!-- Dhilip 26-11-2012 InvertedBooleanConverter-->
            <!--<telerik:GroupBox x:Name="RepeatsGroup" Margin="3" Grid.Row="1" telerik:LocalizationManager.ResourceKey="RecurrencePattern" telerik:StyleManager.Theme="{StaticResource Theme}">
                <telerik:RadTabControl IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" IsDefaultItemSelected="False" Style="{StaticResource RepeatSelectionTabControlStyle}">
                    <telerik:RadTabItem x:Name="RepeatDaily" Style="{StaticResource RepeatSelectionTabItemControlStyle}" Header="Daily" IsSelected="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Daily;WeekDays, Mode=TwoWay}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <StackPanel Grid.Row="0" Orientation="Horizontal">
                                <RadioButton x:Name="DailyRB" Margin="3" VerticalAlignment="Center" GroupName="DailyGroup" telerik:LocalizationManager.ResourceKey="Every" IsChecked="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Daily, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                <telerik:RadNumericUpDown x:Name="DailyDetailsUpDown" Margin="3" VerticalAlignment="Center" MinWidth="70" IsInteger="True" Maximum="999" Value="{Binding Interval, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Days" Foreground="{StaticResource RadScheduleForeground}" />
                            </StackPanel>
                            <RadioButton x:Name="WorkdaysRB" Grid.Row="1" Margin="3" VerticalAlignment="Center" GroupName="DailyGroup" telerik:LocalizationManager.ResourceKey="EveryWeekday" IsChecked="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=WeekDays, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                        </Grid>
                    </telerik:RadTabItem>
                    <telerik:RadTabItem x:Name="RepeatWeekly" Style="{StaticResource RepeatSelectionTabItemControlStyle}" Header="Weekly" IsSelected="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Weekly, Mode=TwoWay}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <StackPanel Grid.Row="0" Orientation="Horizontal">
                                <telerik:Label Margin="3" VerticalAlignment="Center" Target="{Binding ElementName=EveryWeekUpDown}" telerik:LocalizationManager.ResourceKey="RecurEvery" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                <telerik:RadNumericUpDown x:Name="EveryWeekUpDown" Margin="3" VerticalAlignment="Center" MinWidth="70" IsInteger="True" Maximum="99" Value="{Binding Interval, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}"  >
                                </telerik:RadNumericUpDown>
                                <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="WeeksOn" Foreground="{StaticResource RadScheduleForeground}" />
                            </StackPanel>
                            <ItemsControl Grid.Row="1" ItemsSource="{Binding WeekDays}" IsTabStop="False">
                                <ItemsControl.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <telerik:RadUniformGrid Rows="2" />
                                    </ItemsPanelTemplate>
                                </ItemsControl.ItemsPanel>
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <CheckBox Margin="3 3 12 3" Content="{Binding Name}" IsChecked="{Binding  IsSelected, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </ItemsControl>
                        </Grid>
                    </telerik:RadTabItem>
                    <telerik:RadTabItem x:Name="RepeatMonthly" Style="{StaticResource RepeatSelectionTabItemControlStyle}" Header="Monthly" IsSelected="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Monthly;MonthlyNth, Mode=TwoWay}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <StackPanel Grid.Row="0" Orientation="Horizontal">
                                <RadioButton x:Name="MonthlyRB" Margin="3" VerticalAlignment="Center" GroupName="MonthlyButtons" telerik:LocalizationManager.ResourceKey="Day" IsChecked="{Binding RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Monthly, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                <telerik:RadNumericUpDown x:Name="MonthlyDetailsUpDown1" Margin="3" VerticalAlignment="Center" MinWidth="70" IsInteger="True" Maximum="31" Value="{Binding DayOfMonth, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="OfEvery" Foreground="{StaticResource RadScheduleForeground}" />
                                <telerik:RadNumericUpDown Name="MonthlyDetailsUpDown2" Margin="3" VerticalAlignment="Center" MinWidth="70" IsInteger="True" Maximum="99" Value="{Binding Interval, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Months" Foreground="{StaticResource RadScheduleForeground}" />
                            </StackPanel>
                            <StackPanel Grid.Row="1" Orientation="Horizontal">
                                <RadioButton x:Name="MonthlyNthRB" Margin="3" VerticalAlignment="Center" GroupName="MonthlyButtons" telerik:LocalizationManager.ResourceKey="The" IsChecked="{Binding RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=MonthlyNth, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                <telerik:RadComboBox Margin="3" VerticalAlignment="Center" Width="70" ItemsSource="{Binding WeekOfMonths}" DisplayMemberPath="Name" SelectedValuePath="Value" SelectedValue="{Binding WeekOfMonth, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                <telerik:RadComboBox Margin="3" VerticalAlignment="Center" Width="100" ItemsSource="{Binding NthRecurrenceDays}" DisplayMemberPath="Name" SelectedValuePath="Value" SelectedValue="{Binding NthRecurrenceDay, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="OfEvery" Foreground="{StaticResource RadScheduleForeground}" />
                                <telerik:RadNumericUpDown Name="MonthlyDetailsUpDown3" Margin="3" VerticalAlignment="Center" MinWidth="70" IsInteger="True" Maximum="99" Value="{Binding Interval, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Months" Foreground="{StaticResource RadScheduleForeground}" />
                            </StackPanel>
                        </Grid>
                    </telerik:RadTabItem>
                    <telerik:RadTabItem x:Name="RepeatYearly" Style="{StaticResource RepeatSelectionTabItemControlStyle}" Header="Yearly" IsSelected="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Yearly;YearlyNth, Mode=TwoWay}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="50*" />
                                <RowDefinition Height="50*" />
                            </Grid.RowDefinitions>
                            <StackPanel Grid.Row="0" Orientation="Horizontal">
                                <RadioButton x:Name="YearlyRB" GroupName="YearlyGroup" Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Every" IsChecked="{Binding RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Yearly, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                <telerik:RadComboBox x:Name="YearlyDetails12" Margin="3" VerticalAlignment="Center" Width="100" ItemsSource="{Binding NamesOfMonths}" DisplayMemberPath="Value" SelectedValuePath="Key" SelectedValue="{Binding MonthOfYear, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                <telerik:RadNumericUpDown x:Name="YearlyDetailsUpDown3" Margin="3" VerticalAlignment="Center" Width="70" IsInteger="True" Maximum="31" Value="{Binding DayOfMonth, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                            </StackPanel>
                            <StackPanel Grid.Row="1" Orientation="Horizontal">
                                <RadioButton x:Name="YearlyNthRB" GroupName="YearlyGroup" Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="The" IsChecked="{Binding RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=YearlyNth, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                <telerik:RadComboBox x:Name="YearlyDetails21" Margin="3" VerticalAlignment="Center" Width="80" ItemsSource="{Binding WeekOfMonths}" DisplayMemberPath="Name" SelectedValuePath="Value" SelectedValue="{Binding WeekOfMonth, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                <telerik:RadComboBox x:Name="YearlyDetails22" Margin="3" VerticalAlignment="Center" Width="100" ItemsSource="{Binding NthRecurrenceDays}" DisplayMemberPath="Name" SelectedValuePath="Value" SelectedValue="{Binding NthRecurrenceDay, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Of" Foreground="{StaticResource RadScheduleForeground}" />
                                <telerik:RadComboBox x:Name="YearlyDetails23" Margin="3" VerticalAlignment="Center" Width="100" ItemsSource="{Binding NamesOfMonths}" DisplayMemberPath="Value" SelectedValuePath="Key" SelectedValue="{Binding MonthOfYear, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                            </StackPanel>
                        </Grid>
                    </telerik:RadTabItem>
                </telerik:RadTabControl>
            </telerik:GroupBox>
            <telerik:GroupBox x:Name="RangeGroup" Margin="3" Grid.Row="2" telerik:LocalizationManager.ResourceKey="RangeOfRecurrence" telerik:StyleManager.Theme="{StaticResource Theme}">
                <Grid  >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*" />
                        <ColumnDefinition Width="2*" />
                    </Grid.ColumnDefinitions>

                    <StackPanel Grid.Column="0" Orientation="Horizontal">
                        <telerik:Label Margin="3" VerticalAlignment="Center" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" Target="{Binding ElementName=StartDate}" telerik:LocalizationManager.ResourceKey="StartColon" telerik:StyleManager.Theme="{StaticResource Theme}" />
                        <telerik:RadDatePicker x:Name="StartDate" Margin="3" VerticalAlignment="Center" Width="100" IsReadOnly="{Binding IsReadOnly}" SelectedValue="{Binding Start, Mode=TwoWay}" Culture="{Binding DefaultCulture,Source={StaticResource LocalizationManager}}" telerik:StyleManager.Theme="{StaticResource Theme}"  />
                    </StackPanel>

                    <telerik:RadUniformGrid Grid.Column="1" Columns="1">
                        <RadioButton x:Name="NoEndDate" Margin="3" VerticalAlignment="Center" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" telerik:LocalizationManager.ResourceKey="NoEndDate" IsChecked="{Binding RecurrenceRangeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=NoEndDate, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />

                        <StackPanel Orientation="Horizontal">
                            <RadioButton x:Name="EndAfter" Margin="3" MinWidth="100" VerticalAlignment="Center" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" telerik:LocalizationManager.ResourceKey="EndAfter" IsChecked="{Binding Path=RecurrenceRangeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=MaxOccurrences, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                            <telerik:RadNumericUpDown x:Name="OccurencesUpDown" Margin="3" VerticalAlignment="Center" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" IsInteger="True" MinWidth="70" Maximum="9999" Value="{Binding MaxOccurrences, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                            <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Occurrences" Foreground="{StaticResource RadScheduleForeground}" />
                        </StackPanel>

                        <StackPanel Orientation="Horizontal">
                            <RadioButton x:Name="EndBy" Margin="3" MinWidth="70" VerticalAlignment="Center" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" telerik:StyleManager.Theme="{StaticResource Theme}" telerik:LocalizationManager.ResourceKey="EndBy" IsChecked="{Binding Path=RecurrenceRangeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=RepeatUntil, Mode=TwoWay}" />
                            <telerik:RadDatePicker Margin="3" VerticalAlignment="Center" Width="120" IsReadOnly="{Binding IsReadOnly}" SelectedValue="{Binding RecursUntil, Mode=TwoWay}" Culture="{Binding DefaultCulture,Source={StaticResource LocalizationManager}}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                        </StackPanel>
                    </telerik:RadUniformGrid>
                </Grid>
            </telerik:GroupBox>-->
            <StackPanel x:Name="WindowButtons" Grid.Row="3" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                <telerik:RadButton x:Name="RemoveRecurrenceBtn" Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="RemoveRecurrence" 
								    
					
					Command="local:RadScheduleViewCommands.DeleteRecurrenceRule"
					
					Visibility="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource BooleanToVisibilityConverter}, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                <telerik:RadButton x:Name="OKButton" Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Ok" 
								    
					
					Command="telerik:WindowCommands.Confirm"
					 telerik:RadWindow.ResponseButton="Accept" telerik:StyleManager.Theme="{StaticResource Theme}" />
                <telerik:RadButton x:Name="CancelButton" Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Cancel" 
								    
					
							Command="telerik:WindowCommands.Cancel"
					
					telerik:RadWindow.ResponseButton="Cancel" telerik:StyleManager.Theme="{StaticResource Theme}" />
            </StackPanel>
        </Grid>
    </ControlTemplate>
    <Style x:Key="EditRecurrenceDialogStyle" TargetType="local:SchedulerDialog">
        <Setter Property="Foreground" Value="{StaticResource RadScheduleForeground}" />
        <Setter Property="Width" Value="550" />
        <Setter Property="IsTabStop" Value="False" />

        <Setter Property="Template" Value="{StaticResource EditRecurrenceTemplate}" />
        <Setter Property="IconTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Image Stretch="None" Source="/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/EditAppointment.png"  />
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="HeaderTemplate">
            <Setter.Value>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" MaxWidth="450" HorizontalAlignment="Left">
                        <TextBlock telerik:LocalizationManager.ResourceKey="Event" Visibility="{Binding Appointment.IsAllDayEvent, Converter={StaticResource BooleanToVisibilityConverter}}" Foreground="{StaticResource RadScheduleForeground}" />
                        <TextBlock telerik:LocalizationManager.ResourceKey="Activity" Visibility="{Binding Appointment.IsAllDayEvent, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" Foreground="{StaticResource RadScheduleForeground}" />
                        <TextBlock Text=" - " Foreground="{StaticResource RadScheduleForeground}" />
                        <TextBlock x:Name="SubjectTextBlock" Text="{Binding Appointment.Subject}" Visibility="{Binding Appointment.Subject, Converter={StaticResource NullToVisibilityConverter}}" Foreground="{StaticResource RadScheduleForeground}"/>
                        <TextBlock telerik:LocalizationManager.ResourceKey="Untitled" Visibility="{Binding Appointment.Subject, Converter={StaticResource InvertedNullToVisibilityConverter}}" Foreground="{StaticResource RadScheduleForeground}"/>
                    </StackPanel>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- DeleteAppointmentConfirmStyle-->
    <ControlTemplate x:Key="DeleteAppointmentConfirmTemplate" TargetType="local:SchedulerDialog">
        <StackPanel>
            <Grid>
                <Image Margin="15" HorizontalAlignment="Left" VerticalAlignment="Center" Stretch="None" Source="/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/del_big.png" />
                <TextBlock Margin="85 15 15 15" TextWrapping="Wrap" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="DeleteItemQuestion" />
            </Grid>
            <StackPanel x:Name="FooterControls" Grid.Row="2" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Ok" 
								    
					
					Command="telerik:WindowCommands.Confirm"
					
					telerik:RadWindow.ResponseButton="Accept" telerik:StyleManager.Theme="{StaticResource Theme}" />
                <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Cancel" 
								   
						Command="telerik:WindowCommands.Cancel"
						
						telerik:RadWindow.ResponseButton="Cancel" 
								   telerik:StyleManager.Theme="{StaticResource Theme}"
						 />
            </StackPanel>
        </StackPanel>
    </ControlTemplate>
    <Style x:Key="DeleteAppointmentConfirmDialogStyle" TargetType="local:SchedulerDialog">
        <Setter Property="Foreground" Value="{StaticResource RadScheduleForeground}" />
        <Setter Property="Width" Value="300" />
        <Setter Property="HeaderTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock MaxWidth="200" HorizontalAlignment="Left" telerik:LocalizationManager.ResourceKey="DeleteItem" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template" Value="{StaticResource DeleteAppointmentConfirmTemplate}" />
    </Style>

    <!--RecurrenceChoiceStyle-->
    <ControlTemplate x:Key="RecurrenceChoiceTemplate" TargetType="local:SchedulerDialog">
        <StackPanel>
            <Grid>
                <Image Margin="15" HorizontalAlignment="Left" VerticalAlignment="Center" Stretch="None" Source="/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/del_big.png" />
                <StackPanel Margin="85 15 15 15" VerticalAlignment="Top">
                    <TextBlock x:Name="SubjectTextBlock" Margin="3" Text="{Binding Occurrence.Appointment.Subject}" Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource NullToVisibilityConverter}}" />
                    <TextBlock x:Name="Untitled" Margin="3" telerik:LocalizationManager.ResourceKey="Untitled" Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource InvertedNullToVisibilityConverter}}"/>
                    <RadioButton  Margin="3" telerik:LocalizationManager.ResourceKey="OpenOccurrence" GroupName="RecurrenceModeChoice" IsChecked="{Binding IsOccurrenceModeSelected, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                    <RadioButton  Margin="3" telerik:LocalizationManager.ResourceKey="OpenSeries" GroupName="RecurrenceModeChoice" IsChecked="{Binding IsSeriesModeSelected, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                </StackPanel>
            </Grid>
            <StackPanel x:Name="FooterControls" Grid.Row="2" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Ok" 
								   
					Command="telerik:WindowCommands.Confirm"
					 telerik:RadWindow.ResponseButton="Accept" telerik:StyleManager.Theme="{StaticResource Theme}" 
								    >
                </telerik:RadButton>
                <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Cancel" 
								    
					Command="telerik:WindowCommands.Cancel"
					 telerik:RadWindow.ResponseButton="Cancel" telerik:StyleManager.Theme="{StaticResource Theme}" 
								    >
                </telerik:RadButton>
            </StackPanel>
        </StackPanel>
    </ControlTemplate>
    <ControlTemplate x:Key="RecurrenceChoiceDeletingTemplate" TargetType="local:SchedulerDialog">
        <StackPanel>
            <Grid>
                <Image Margin="15" HorizontalAlignment="Left" VerticalAlignment="Center" Stretch="None" Source="/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/del_big.png" />
                <StackPanel Margin="85 15 15 15" VerticalAlignment="Top">
                    <TextBlock x:Name="SubjectTextBlock" Margin="3" Text="{Binding Occurrence.Appointment.Subject}" Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource NullToVisibilityConverter}}" />
                    <TextBlock x:Name="Untitled" Margin="3" telerik:LocalizationManager.ResourceKey="Untitled" Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource InvertedNullToVisibilityConverter}}"/>
                    <RadioButton  Margin="3 9 3 3" telerik:LocalizationManager.ResourceKey="DeleteOccurrence" GroupName="RecurrenceModeChoiceDel" IsChecked="{Binding IsOccurrenceModeSelected, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                    <RadioButton  Margin="3" telerik:LocalizationManager.ResourceKey="DeleteSeries" GroupName="RecurrenceModeChoiceDel" IsChecked="{Binding IsSeriesModeSelected, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                </StackPanel>
            </Grid>
            <StackPanel x:Name="FooterControls" Grid.Row="2" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Ok" 
								   
					Command="telerik:WindowCommands.Confirm"
					 telerik:RadWindow.ResponseButton="Accept" telerik:StyleManager.Theme="{StaticResource Theme}" 
								    >
                </telerik:RadButton>
                <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Cancel" 
								   
					Command="telerik:WindowCommands.Cancel"
					 telerik:RadWindow.ResponseButton="Cancel" telerik:StyleManager.Theme="{StaticResource Theme}" 
								    >
                </telerik:RadButton>
            </StackPanel>
        </StackPanel>
    </ControlTemplate>
    <ControlTemplate x:Key="RecurrenceChoiceResizeTemplate" TargetType="local:SchedulerDialog">
        <StackPanel>
            <StackPanel Margin="15 15 15 15" VerticalAlignment="Top">
                <TextBlock x:Name="SubjectTextBlock" Margin="3" Text="{Binding Occurrence.Appointment.Subject}" Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource NullToVisibilityConverter}}" />
                <TextBlock x:Name="Untitled" Margin="3" telerik:LocalizationManager.ResourceKey="Untitled" Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource InvertedNullToVisibilityConverter}}"/>
                <TextBlock Margin="3" telerik:LocalizationManager.ResourceKey="ResizeRecurringItemQuestion" TextWrapping="Wrap"/>
                <RadioButton Margin="3 9 3 3" telerik:LocalizationManager.ResourceKey="ResizeOccurrence" GroupName="RecurrenceModeChoice" IsChecked="{Binding IsOccurrenceModeSelected, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                <RadioButton Margin="3" telerik:LocalizationManager.ResourceKey="ResizeSeries" GroupName="RecurrenceModeChoice" IsChecked="{Binding IsSeriesModeSelected, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
            </StackPanel>
            <StackPanel x:Name="FooterControls" Grid.Row="2" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Ok" 
								   
					Command="telerik:WindowCommands.Confirm"
					 telerik:RadWindow.ResponseButton="Accept" telerik:StyleManager.Theme="{StaticResource Theme}" 
								    >
                </telerik:RadButton>
                <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Cancel" 
								    
					Command="telerik:WindowCommands.Cancel"
					 telerik:RadWindow.ResponseButton="Cancel" telerik:StyleManager.Theme="{StaticResource Theme}" 
								    >
                </telerik:RadButton>
            </StackPanel>
        </StackPanel>
    </ControlTemplate>
    <ControlTemplate x:Key="RecurrenceChoiceDragDropTemplate" TargetType="local:SchedulerDialog">
        <StackPanel>
            <StackPanel Margin="15 15 15 15">
                <TextBlock x:Name="SubjectTextBlock" Margin="3" Text="{Binding Occurrence.Appointment.Subject}" Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource NullToVisibilityConverter}}" />
                <TextBlock x:Name="Untitled" Margin="3" telerik:LocalizationManager.ResourceKey="Untitled" Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource InvertedNullToVisibilityConverter}}"/>
                <TextBlock  Margin="3" telerik:LocalizationManager.ResourceKey="DragRecurringItemQuestion" TextWrapping="Wrap" />
                <RadioButton  Margin="3 9 3 3" telerik:LocalizationManager.ResourceKey="DragDropOccurrence" GroupName="RecurrenceModeChoice" IsChecked="{Binding IsOccurrenceModeSelected, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                <RadioButton  Margin="3" telerik:LocalizationManager.ResourceKey="DragDropSeries" GroupName="RecurrenceModeChoice" IsChecked="{Binding IsSeriesModeSelected, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
            </StackPanel>
            <StackPanel x:Name="FooterControls" Grid.Row="2" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Ok" 
								  
					Command="telerik:WindowCommands.Confirm"
					 telerik:RadWindow.ResponseButton="Accept" telerik:StyleManager.Theme="{StaticResource Theme}"
					 >
                </telerik:RadButton>
                <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Cancel" 
								   
					Command="telerik:WindowCommands.Cancel"
					 telerik:RadWindow.ResponseButton="Cancel" telerik:StyleManager.Theme="{StaticResource Theme}"
					 >
                </telerik:RadButton>
            </StackPanel>
        </StackPanel>
    </ControlTemplate>
    <Style x:Key="RecurrenceChoiceDialogStyle" TargetType="local:SchedulerDialog">
        <Setter Property="Foreground" Value="{StaticResource RadScheduleForeground}" />
        <Setter Property="Width" Value="300" />
        <Setter Property="HeaderTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock MaxWidth="200" HorizontalAlignment="Left" telerik:LocalizationManager.ResourceKey="AppointmentRecurrence" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template" Value="{StaticResource RecurrenceChoiceTemplate}" />
    </Style>
    <Style x:Key="RecurrenceChoiceDeleteDialogStyle" TargetType="local:SchedulerDialog">
        <Setter Property="Foreground" Value="{StaticResource RadScheduleForeground}" />
        <Setter Property="Width" Value="300" />
        <Setter Property="HeaderTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock MaxWidth="200" HorizontalAlignment="Left" telerik:LocalizationManager.ResourceKey="AppointmentRecurrence" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template" Value="{StaticResource RecurrenceChoiceDeletingTemplate}" />
    </Style>
    <Style x:Key="RecurrenceChoiceResizeDialogStyle" TargetType="local:SchedulerDialog">
        <Setter Property="Foreground" Value="{StaticResource RadScheduleForeground}" />
        <Setter Property="Width" Value="350" />
        <Setter Property="HeaderTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock MaxWidth="200" HorizontalAlignment="Left" telerik:LocalizationManager.ResourceKey="AppointmentRecurrence" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template" Value="{StaticResource RecurrenceChoiceResizeTemplate}" />
    </Style>
    <Style x:Key="RecurrenceChoiceDragDropDialogStyle" TargetType="local:SchedulerDialog">
        <Setter Property="Foreground" Value="{StaticResource RadScheduleForeground}" />
        <Setter Property="Width" Value="350" />
        <Setter Property="HeaderTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock MaxWidth="200" HorizontalAlignment="Left" telerik:LocalizationManager.ResourceKey="AppointmentRecurrence" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template" Value="{StaticResource RecurrenceChoiceDragDropTemplate}" />
    </Style>
    <!-- << DIALOGS -->

    <!-- TimeRuler -->
    <Style x:Key="GoToDayButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Normal}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    
 <Border x:Name="OuterBorder" BorderBrush="{StaticResource GroupHeaderHeaderOuterBorder}" Background="{StaticResource GroupHeaderHeaderBackground}" BorderThickness="1">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemBackground_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemInnerBorder_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemForeground_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemBackground_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemInnerBorder_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemForeground_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="InnerBorder" BorderBrush="{StaticResource MonthViewTimeRulerItemInnerBorder}" BorderThickness="1" Padding="{TemplateBinding Padding}">
                            <ContentControl x:Name="Content" Content="{TemplateBinding Content}" Margin="-2" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Foreground="{TemplateBinding Foreground}"
								 />
                        </Border>
                    </Border>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="GoToDayVerticalButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Normal}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Border x:Name="OuterBorder" BorderBrush="{StaticResource GroupHeaderHeaderOuterBorder_Vertical}" Background="{StaticResource GroupHeaderHeaderBackground_Vertical}" BorderThickness="1">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemBackgroundVertical_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemInnerBorderVertical_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemForeground_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemBackgroundVertical_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemInnerBorderVertical_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemForeground_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="InnerBorder" BorderBrush="{StaticResource GroupHeaderHeaderInnerBorder_Vertical}" BorderThickness="1" Padding="{TemplateBinding Padding}">
                            <ContentControl x:Name="Content" Content="{TemplateBinding Content}" Margin="-2" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Foreground="{TemplateBinding Foreground}"
								 />
                        </Border>
                    </Border>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="GoToDayTodayButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Today}" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Border x:Name="OuterBorder" BorderBrush="{StaticResource MonthViewTimeRulerItemOuterBorder_Today}" Background="{StaticResource MonthViewTimeRulerItemBackground_Today}" BorderThickness="1">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemBackground_TodayMouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemInnerBorder_TodayMouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemBackground_TodayPressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemInnerBorder_TodayPressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="InnerBorder" BorderBrush="{StaticResource MonthViewTimeRulerItemInnerBorder_Today}" BorderThickness="1" Padding="{TemplateBinding Padding}">
                            <ContentPresenter Margin="-2" />
                        </Border>
                    </Border>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="GoToDayTodayVerticalButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Today}" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Border x:Name="OuterBorder" BorderBrush="{StaticResource GroupHeaderHeaderOuterBorder_VerticalToday}" Background="{StaticResource GroupHeaderHeaderBackground_VerticalToday}" BorderThickness="1">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemBackgroundVertical_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemInnerBorderVertical_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemForeground_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemBackgroundVertical_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemInnerBorderVertical_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemForeground_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>


                        <Border x:Name="InnerBorder" BorderBrush="{StaticResource GroupHeaderHeaderInnerBorder_VerticalToday}" BorderThickness="1" Padding="{TemplateBinding Padding}">
                            <ContentControl x:Name="Content" Content="{TemplateBinding Content}" Margin="-2" Foreground="{TemplateBinding Foreground}"
								 />
                        </Border>
                    </Border>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ExpandMonthViewButtonStyle" TargetType="telerik:RadToggleButton">
        <Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Normal}" />

        <Setter Property="IsTabStop" Value="False" />

        <Setter Property="Margin" Value="3 2 3 4" />
        <Setter Property="MinWidth" Value="13" />
        <Setter Property="MinHeight" Value="13" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Grid x:Name="Root">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewExpandOuterBorder_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewExpandButtonBackground_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckInnerBorder" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewExpandInnerBorder_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Expand" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewExpandIconStroke_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Collapse" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewExpandIconStroke_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewExpandOuterBorder_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewExpandButtonBackground_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckInnerBorder" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewExpandInnerBorder_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Expand" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewExpandIconStroke_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Collapse" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewExpandIconStroke_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0.0" Storyboard.TargetName="Collapse" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0.0" Storyboard.TargetName="Expand" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked"/>
                                <VisualState x:Name="Indeterminate">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0.0" Storyboard.TargetName="Root" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="CheckOuterBorder" CornerRadius="1" BorderThickness="1" BorderBrush="{StaticResource MonthViewExpandOuterBorder}" 
								Background="{StaticResource MonthViewExpandButtonBackground}">
                            <Rectangle x:Name="CheckInnerBorder"  Stroke="{StaticResource MonthViewExpandInnerBorder}" />
                        </Border>

                        <Path x:Name="Expand" Data="M0,0 L7,0 L3.5,4 Z" Fill="{StaticResource MonthViewExpandIconStroke}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                        <Path x:Name="Collapse" Visibility="Collapsed" Data="M0,4 L7,4 L3.5,0 Z" Fill="{StaticResource MonthViewExpandIconStroke}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="TimeRulerGroupItemStyle" TargetType="local:TimeRulerGroupItem">
        <Setter Property="Foreground" Value="{StaticResource TimeRulerGroupItemForeground}" />
        <Setter Property="Background" Value="{StaticResource GroupHeaderHeaderBackground}" />
        <Setter Property="BorderBrush" Value="{StaticResource GroupHeaderHeaderOuterBorder}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="Margin" Value="0 0 -1 -1" />
        <Setter Property="Padding" Value="4 2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:TimeRulerGroupItem">
                    <telerik:RadButton Style="{StaticResource GoToDayButtonStyle}" Padding="{TemplateBinding Padding}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Command="local:RadScheduleViewCommands.SetDayViewMode" CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.DateTime.Date}">
                        <ContentPresenter x:Name="Content" />
                    </telerik:RadButton>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="TimeRulerGroupItemStyle_Vertical" TargetType="local:TimeRulerGroupItem" BasedOn="{StaticResource TimeRulerGroupItemStyle}">
        <Setter Property="Background" Value="{StaticResource GroupHeaderHeaderBackground_Vertical}" />
        <Setter Property="BorderBrush" Value="{StaticResource GroupHeaderHeaderOuterBorder_Vertical}" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="Orientation" Value="Vertical" />
        <Setter Property="Margin" Value="0 0 -1 -1" />
        <Setter Property="Padding" Value="2 4" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:TimeRulerGroupItem">
                    <telerik:RadButton Style="{StaticResource GoToDayVerticalButtonStyle}" Padding="{TemplateBinding Padding}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Command="local:RadScheduleViewCommands.SetDayViewMode" CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.DateTime.Date}">
                        <ContentPresenter x:Name="Content" />
                    </telerik:RadButton>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MajorHorizontalTimeRulerItemStyle" TargetType="local:TimeRulerItem">
        <Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Normal}" />
        <Setter Property="BorderBrush" Value="{StaticResource TimeRulerItemMajorTickStroke}" />
        <Setter Property="BorderThickness" Value="1 0 0 0" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:TimeRulerItem">
                    <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                        <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MinorHorizontalTimeRulerItemStyle" TargetType="local:TimeRulerItem">
        <Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Normal}" />
        <Setter Property="BorderBrush" Value="{StaticResource TimeRulerItemMinorTickStroke}" />
        <Setter Property="BorderThickness" Value="1 0 0 0" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:TimeRulerItem">
                    <Grid>
                        <Border Height="5" VerticalAlignment="Bottom" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" />
                        <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MajorVerticalTimeRulerItemStyle" TargetType="local:TimeRulerItem">
        <Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Normal}" />
        <Setter Property="BorderBrush" Value="{StaticResource TimeRulerItemMajorTickStroke_Vertical}" />
        <Setter Property="BorderThickness" Value="0 1 0 0" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:TimeRulerItem">
                    <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                        <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MinorVerticalTimeRulerItemStyle" TargetType="local:TimeRulerItem">
        <Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Normal}" />
        <Setter Property="BorderBrush" Value="{StaticResource TimeRulerItemMinorTickStroke_Vertical}" />
        <Setter Property="BorderThickness" Value="0 1 0 0" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:TimeRulerItem">
                    <Grid>
                        <Border Width="20" HorizontalAlignment="Right" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" />
                        <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="TimeRulerLineStyle" TargetType="local:TimeRulerLine">
        <Setter Property="BorderBrush" Value="{StaticResource TimeRulerLineStroke}" />
        <Setter Property="Background" Value="Black" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:TimeRulerLine">
                    <Border x:Name="LineVisual" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="0 1 0 0">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="OrientationStates">
                                <VisualState x:Name="Horizontal">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LineVisual" Storyboard.TargetProperty="BorderThickness">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>1 0 0 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Vertical" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                    </Border>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="TimeRulerMonthViewGroupItemStyle" TargetType="local:TimeRulerMonthViewGroupItem">
        <Setter Property="Foreground" Value="{StaticResource TimeRulerGroupItemForeground}" />
        <Setter Property="Background" Value="{x:Null}" />
        <Setter Property="BorderBrush" Value="{x:Null}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:TimeRulerMonthViewGroupItem">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="TimeRulerMonthViewItemStyle" TargetType="local:TimeRulerMonthViewItem">
        <Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Normal}" />
        <Setter Property="Margin" Value="0 -1 -1 0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:TimeRulerMonthViewItem">
                    <Grid>
                        <telerik:RadButton Padding="0" VerticalAlignment="Top" Height="22" Style="{StaticResource GoToDayButtonStyle}" Command="local:RadScheduleViewCommands.SetDayViewMode" CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.DateTime.Date}">
                            <ContentPresenter Margin="{TemplateBinding Padding}" />
                        </telerik:RadButton>
                        <telerik:RadToggleButton Visibility="{Binding ExpandButtonVisibility}" IsChecked="{Binding IsExpanded, Mode=TwoWay}" Style="{StaticResource ExpandMonthViewButtonStyle}" HorizontalAlignment="Right" VerticalAlignment="Bottom" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="TimeRulerMonthViewTodayItemStyle" TargetType="local:TimeRulerMonthViewItem">
        <Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Normal}" />
        <Setter Property="Margin" Value="0 -1 -1 0" />


        <Setter Property="Canvas.ZIndex" Value="1" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:TimeRulerMonthViewItem">
                    <Grid>
                        <Border BorderBrush="{StaticResource GroupHeaderBorderBrush_Today}" BorderThickness="{StaticResource HorizontalGroupHeaderTodayBorderThickness}" />
                        <telerik:RadButton Padding="0" VerticalAlignment="Top" Height="22" Style="{StaticResource GoToDayTodayButtonStyle}" Command="local:RadScheduleViewCommands.SetDayViewMode" CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.DateTime.Date}">
                            <ContentPresenter Margin="{TemplateBinding Padding}" />
                        </telerik:RadButton>
                        <telerik:RadToggleButton Visibility="{Binding ExpandButtonVisibility}" IsChecked="{Binding IsExpanded, Mode=TwoWay}" Style="{StaticResource ExpandMonthViewButtonStyle}" HorizontalAlignment="Right" VerticalAlignment="Bottom" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <local:TimeRulerItemTemplateSelector x:Key="TimeRulerItemTemplateSelector">
        <local:TimeRulerItemTemplateSelector.HorizontalDayMajorItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FormattedValue}" Margin="2" />
            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.HorizontalDayMajorItemTemplate>
        <local:TimeRulerItemTemplateSelector.HorizontalDayMinorItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FormattedValue}" Margin="2" />
            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.HorizontalDayMinorItemTemplate>
        <local:TimeRulerItemTemplateSelector.HorizontalWeekMajorItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FormattedValue}" Margin="2" />
            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.HorizontalWeekMajorItemTemplate>
        <local:TimeRulerItemTemplateSelector.HorizontalWeekMinorItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FormattedValue}" Margin="2" />
            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.HorizontalWeekMinorItemTemplate>
        <local:TimeRulerItemTemplateSelector.VerticalDayMajorItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FormattedValue}" Margin="0 2" MinWidth="54" TextAlignment="Right" />
            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.VerticalDayMajorItemTemplate>
        <local:TimeRulerItemTemplateSelector.VerticalDayMinorItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FormattedValue}" Margin="0 2" MinWidth="54" TextAlignment="Right" />
            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.VerticalDayMinorItemTemplate>
        <local:TimeRulerItemTemplateSelector.VerticalWeekMajorItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FormattedValue}" Margin="0 2" MinWidth="54" TextAlignment="Right" />
            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.VerticalWeekMajorItemTemplate>
        <local:TimeRulerItemTemplateSelector.VerticalWeekMinorItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FormattedValue}" Margin="0 2" MinWidth="54" TextAlignment="Right" />
            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.VerticalWeekMinorItemTemplate>
        <local:TimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FormattedValue}" Margin="2 1" TextAlignment="Left" />
            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
        <local:TimeRulerItemTemplateSelector.HorizontalTimelineMajorItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FormattedValue}" Margin="2" TextAlignment="Left" />
            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.HorizontalTimelineMajorItemTemplate>
        <local:TimeRulerItemTemplateSelector.HorizontalTimelineMinorItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FormattedValue}" Margin="2" TextAlignment="Left" />
            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.HorizontalTimelineMinorItemTemplate>
        <local:TimeRulerItemTemplateSelector.VerticalTimelineGroupTemplate>
            <DataTemplate>


                <telerikPrimitives:LayoutTransformControl VerticalAlignment="Top">
                    <telerikPrimitives:LayoutTransformControl.LayoutTransform>
                        <RotateTransform Angle="-90" />
                    </telerikPrimitives:LayoutTransformControl.LayoutTransform>
                    <TextBlock Text="{Binding FormattedValue}" Margin="2 1" Height="16" TextAlignment="Right" />
                </telerikPrimitives:LayoutTransformControl>

            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.VerticalTimelineGroupTemplate>
        <local:TimeRulerItemTemplateSelector.VerticalTimelineMajorItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FormattedValue}" Margin="0 2" MinWidth="54" TextAlignment="Right" />
            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.VerticalTimelineMajorItemTemplate>
        <local:TimeRulerItemTemplateSelector.VerticalTimelineMinorItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FormattedValue}" Margin="0 2" MinWidth="54" TextAlignment="Right" />
            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.VerticalTimelineMinorItemTemplate>
        <local:TimeRulerItemTemplateSelector.MonthGroupTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FormattedValue}" Margin="6 2" />
            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.MonthGroupTemplate>
        <local:TimeRulerItemTemplateSelector.MonthItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding FormattedValue}" Margin="6 2" />
            </DataTemplate>
        </local:TimeRulerItemTemplateSelector.MonthItemTemplate>
    </local:TimeRulerItemTemplateSelector>
    <local:OrientedTimeRulerItemStyleSelector x:Key="TimeRulerItemStyleSelector"
			MonthViewGroupStyle="{StaticResource TimeRulerMonthViewGroupItemStyle}"
			MonthViewTickStyle="{StaticResource TimeRulerMonthViewItemStyle}"
			MonthViewTodayTickStyle="{StaticResource TimeRulerMonthViewTodayItemStyle}"
			HorizontalGroupItemStyle="{StaticResource TimeRulerGroupItemStyle}"
			VerticalGroupItemStyle="{StaticResource TimeRulerGroupItemStyle_Vertical}"
			MajorHorizontalTickStyle="{StaticResource MajorHorizontalTimeRulerItemStyle}"
			MajorVerticalTickStyle="{StaticResource MajorVerticalTimeRulerItemStyle}"
			MinorHorizontalTickStyle="{StaticResource MinorHorizontalTimeRulerItemStyle}"
			MinorVerticalTickStyle="{StaticResource MinorVerticalTimeRulerItemStyle}"
			HorizontalLineStyle="{StaticResource TimeRulerLineStyle}"
			VerticalLineStyle="{StaticResource TimeRulerLineStyle}">
    </local:OrientedTimeRulerItemStyleSelector>

    <!-- Group headers -->
    <ControlTemplate x:Key="GroupHeaderButtonControlTemplate" TargetType="local:GroupHeaderButton">
        <Grid>

            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="CommandMouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverOuterBorderVisual" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="CommandPressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverOuterBorderVisual" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverOuterBorderVisual" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0"  Value="{StaticResource MonthViewTimeRulerItemBackground_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverInnerBorderVisual" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource MonthViewTimeRulerItemInnerBorder_Pressed}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="TodayStates">
                    <VisualState x:Name="NotToday" />
                    <VisualState x:Name="Today">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TodayVisual" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="OrientationStates">
                    <VisualState x:Name="Horizontal">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Visuals"
									Storyboard.TargetProperty="LayoutTransform">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <RotateTransform Angle="-90" />
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Vertical" />
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>



            <telerik:LayoutTransformControl x:Name="Visuals">
                <Grid>
                    <Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Border x:Name="InnerBorder" BorderBrush="{StaticResource MonthViewTimeRulerItemInnerBorder}" BorderThickness="{TemplateBinding BorderThickness}" />
                    </Border>

                    <Border x:Name="TodayVisual" Visibility="Collapsed" BorderBrush="{StaticResource MonthViewTimeRulerItemOuterBorder_Today}" Background="{StaticResource MonthViewTimeRulerItemBackground_Today}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Border BorderBrush="{StaticResource MonthViewTimeRulerItemInnerBorder_Today}" BorderThickness="{TemplateBinding BorderThickness}" />
                    </Border>

                    <Border x:Name="MouseOverOuterBorderVisual" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource MonthViewTimeRulerItemBackground_MouseOver}">
                        <Border x:Name="MouseOverInnerBorderVisual" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource MonthViewTimeRulerItemInnerBorder_MouseOver}" />
                    </Border>

                </Grid>
            </telerik:LayoutTransformControl>


            <ContentControl x:Name="Content" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="-1" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Foreground="{TemplateBinding Foreground}"
				
				 />
        </Grid>

    </ControlTemplate>

    <Style x:Key="GroupHeaderButtonStyle" TargetType="local:GroupHeaderButton">
        <Setter Property="BorderBrush" Value="#FF676364" />
        <Setter Property="Background" Value="#FF303440" />
        <Setter Property="BorderThickness" Value="0,0,0,1" />
        <Setter Property="Foreground" Value="{StaticResource MonthViewTimeRulerItemForeground_Normal}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Template" Value="{StaticResource GroupHeaderButtonControlTemplate}" />
    </Style>

    <local:NullToBooleanConverter x:Key="NullToBooleanConverter" />

    <ControlTemplate x:Key="GroupHeaderTemplate"  TargetType="local:GroupHeader">
        <Grid>

            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OrientationStates">
                    <VisualState x:Name="Horizontal">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="VerticalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <VerticalAlignment>Stretch</VerticalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="HorizontalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <HorizontalAlignment>Left</HorizontalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Vertical" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="DayStates">
                    <VisualState x:Name="NormalDay"/>
                    <VisualState x:Name="NormalDayHorizontal">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="VerticalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <VerticalAlignment>Stretch</VerticalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="HorizontalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <HorizontalAlignment>Left</HorizontalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Today">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource GroupHeaderBorderBrush_Today}" />
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource HorizontalGroupHeaderTodayBorderThickness}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="TodayHorizontal">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="VerticalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <VerticalAlignment>Stretch</VerticalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="HorizontalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <HorizontalAlignment>Left</HorizontalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>


            <Border x:Name="Border" IsHitTestVisible="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderBrush="{TemplateBinding BorderBrush}" 
				 BorderThickness="1"
				 Background="{TemplateBinding Background}">
            </Border>

            <local:GroupHeaderButton
					x:Name="Header"
                    VerticalAlignment="Top"
					Content="{TemplateBinding Content}"
					ContentTemplate="{TemplateBinding ContentTemplate}"
					Command="{TemplateBinding Command}"
					CommandParameter="{TemplateBinding CommandParameter}"
					IsToday="{TemplateBinding IsToday}"
					Orientation="{TemplateBinding Orientation}"
					telerik:StyleManager.Theme="{StaticResource Theme}"
                    Foreground="{TemplateBinding Foreground}"
					 />
        </Grid>

    </ControlTemplate>

    <Style x:Key="GroupHeaderBaseStyle" TargetType="local:GroupHeader">
        <Setter Property="Foreground" Value="{StaticResource TimeRulerGroupItemForeground}" />
        <Setter Property="BorderBrush" Value="{StaticResource GroupHeaderBorderBrush}" />
        <Setter Property="Background" Value="{x:Null}" />
        <Setter Property="BorderThickness" Value="1" />


        <Setter Property="Canvas.ZIndex" Value="-2" />

        <Setter Property="Template" Value="{StaticResource GroupHeaderTemplate}" />
    </Style>

    <Style x:Key="HorizontalGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
        <Setter Property="Margin" Value="0 0 -1 0" />
        <Setter Property="Padding" Value="-1 0 0 0" />


        <Setter Property="Canvas.ZIndex" Value="-2" />

    </Style>
    <Style x:Key="HorizontalTodayGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
        <Setter Property="Margin" Value="0 0 -1 0" />
        <Setter Property="Padding" Value="-1 0 0 0" />


        <Setter Property="Canvas.ZIndex" Value="-1" />
        <Setter Property="BorderBrush" Value="{StaticResource GroupHeaderBorderBrush_Today}" />

    </Style>
    <Style x:Key="HorizontalBottomLevelGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
        <Setter Property="Margin" Value="0 0 -1 0" />
        <Setter Property="Padding" Value="0 0 5 0" />


        <Setter Property="Canvas.ZIndex" Value="-2" />

    </Style>
    <Style x:Key="HorizontalBottomLevelTodayGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
        <Setter Property="Margin" Value="0 0 -1 0" />
        <Setter Property="Padding" Value="1 0 5 0" />


        <Setter Property="Canvas.ZIndex" Value="-1" />
        <Setter Property="BorderBrush" Value="{StaticResource GroupHeaderBorderBrush_Today}" />

        <Setter Property="Foreground" Value="{StaticResource HorizontalBottomLevelTodayForeground}" />
    </Style>
    <Style x:Key="VerticalGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
        <Setter Property="Margin" Value="0 0 0 -1" />
        <Setter Property="Padding" Value="0 -1 0 0" />


        <Setter Property="Canvas.ZIndex" Value="-2" />

    </Style>
    <Style x:Key="VerticalTodayGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
        <Setter Property="Margin" Value="0 0 0 -1" />


        <Setter Property="Canvas.ZIndex" Value="-1" />
        <Setter Property="BorderBrush" Value="{StaticResource GroupHeaderBorderBrush_Today}" />

    </Style>
    <Style x:Key="VerticalBottomLevelGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
        <Setter Property="Margin" Value="0 0 0 -1" />
        <Setter Property="Padding" Value="0 0 0 5" />


        <Setter Property="Canvas.ZIndex" Value="-2" />

    </Style>
    <Style x:Key="VerticalBottomLevelTodayGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
        <Setter Property="Margin" Value="0 0 0 -1" />
        <Setter Property="Padding" Value="0 1 0 5" />


        <Setter Property="Canvas.ZIndex" Value="-1" />
        <Setter Property="BorderBrush" Value="{StaticResource GroupHeaderBorderBrush_Today}" />

    </Style>
    <Style x:Key="MonthViewWeekGroupStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
        <Setter Property="Margin" Value="0 0 0 -1" />
        <Setter Property="Padding" Value="0 -1 0 0" />
    </Style>
    <Style x:Key="MonthViewBottomLevelWeekGroupStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
        <Setter Property="Margin" Value="0 0 0 -1" />
        <Setter Property="Padding" Value="0 21 0 18" />
        <Setter Property="MinHeight" Value="85" />
    </Style>
    <local:OrientedGroupHeaderStyleSelector x:Key="GroupHeaderStyleSelector"
			HorizontalStyle="{StaticResource HorizontalGroupHeaderStyle}"
			HorizontalTodayStyle="{StaticResource HorizontalTodayGroupHeaderStyle}"
			HorizontalBottomLevelStyle="{StaticResource HorizontalBottomLevelGroupHeaderStyle}"
			HorizontalTodayBottomLevelStyle="{StaticResource HorizontalBottomLevelTodayGroupHeaderStyle}"
			
			VerticalStyle="{StaticResource VerticalGroupHeaderStyle}"
			VerticalTodayStyle="{StaticResource VerticalTodayGroupHeaderStyle}"
			VerticalBottomLevelStyle="{StaticResource VerticalBottomLevelGroupHeaderStyle}"
			VerticalTodayBottomLevelStyle="{StaticResource VerticalBottomLevelTodayGroupHeaderStyle}"
			
			MonthViewWeekGroupStyle="{StaticResource MonthViewWeekGroupStyle}"
			MonthViewBottomLevelWeekGroupStyle="{StaticResource MonthViewBottomLevelWeekGroupStyle}">
    </local:OrientedGroupHeaderStyleSelector>

    <local:GroupHeaderTemplateSelector x:Key="GroupHeaderContentTemplateSelector">

        <local:GroupHeaderTemplateSelector.HorizontalTemplate>
            <DataTemplate>
                <ContentPresenter Content="{Binding FormattedName}" Height="16" Margin="4" />
            </DataTemplate>
        </local:GroupHeaderTemplateSelector.HorizontalTemplate>

        <local:GroupHeaderTemplateSelector.VerticalTemplate>
            <DataTemplate>


                <telerikPrimitives:LayoutTransformControl VerticalAlignment="Top">
                    <telerikPrimitives:LayoutTransformControl.LayoutTransform>
                        <RotateTransform Angle="-90" />
                    </telerikPrimitives:LayoutTransformControl.LayoutTransform>
                    <ContentPresenter Content="{Binding FormattedName}" Margin="4" Height="16"  />
                </telerikPrimitives:LayoutTransformControl>

            </DataTemplate>
        </local:GroupHeaderTemplateSelector.VerticalTemplate>

    </local:GroupHeaderTemplateSelector>

    <!-- AppointmentItem -->


    <ControlTemplate x:Key="AppointmentItemHorizontalControlTemplate" TargetType="local:AppointmentItem">
        <Grid x:Name="Root">

            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled" />
                    <VisualState x:Name="Normal">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0:0:0.200" Storyboard.TargetName="MouseOverOverlay" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0.200">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation BeginTime="0:0:0.0" Duration="0:0:0.200" To="0" Storyboard.TargetName="MouseOverOverlay" Storyboard.TargetProperty="Opacity" />
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0:0:0.400" Storyboard.TargetName="MouseOverOverlay" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0.0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation BeginTime="0:0:0.200" Duration="0:0:0.200" To="1" Storyboard.TargetName="MouseOverOverlay" Storyboard.TargetProperty="Opacity" />
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="ReadOnly">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0:0:0.0" Storyboard.TargetName="ReadOnlyVisual" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0.0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="InlineEditing" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="SelectionStates">
                    <VisualState x:Name="Unselected" />
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CommonStatesVisual" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CommonStatesVisual" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource AppointmentItemBackground_Selected}" />
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CommonStatesVisual" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource AppointmentItemOuterBorder_Selected}" />
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CommonStatesVisualInnerBorder" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource AppointmentItemInnerBorder_Selected}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>


            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <!-- small appointment rending visual-->
            <Border x:Name="DurationMarkerVisual" Visibility="{TemplateBinding DurationMarkerVisibility}" Margin="{TemplateBinding DurationMarkerMargin}">
                <Border Background="{StaticResource AppointmentItemOuterBorder}" Margin="0 0 0 -1" CornerRadius="1 1 0 0" Height="4" />
            </Border>

            <Grid Grid.Row="1">


                <telerik:CommandManager.InputBindings>
                    <telerik:InputBindingCollection>
                        <telerik:MouseBinding Gesture="LeftDoubleClick" Command="local:RadScheduleViewCommands.EditAppointment" />
                    </telerik:InputBindingCollection>
                </telerik:CommandManager.InputBindings>


                <Border CornerRadius="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                    <Border CornerRadius="1" BorderBrush="{StaticResource AppointmentItemInnerBorder}" BorderThickness="{TemplateBinding BorderThickness}" />
                </Border>

                <Border x:Name="CommonStatesVisual" Visibility="Collapsed" CornerRadius="2" Background="{StaticResource AppointmentItemBackground_MouseOver}" BorderBrush="{StaticResource AppointmentItemOuterBorder_MouseOver}" BorderThickness="{TemplateBinding BorderThickness}">
                    <Border x:Name="CommonStatesVisualInnerBorder" CornerRadius="1" BorderBrush="{StaticResource AppointmentItemInnerBorder_MouseOver}" BorderThickness="{TemplateBinding BorderThickness}" />
                </Border>

                <Border x:Name="PART_Category" Margin="2" Background="{Binding Path=Category.CategoryBrush}" />

                <Rectangle x:Name="ReadOnlyVisual" Margin="2" Visibility="Collapsed" Fill="{StaticResource AppoinmtentItemBackground_ReadOnly}" />

                <Grid Margin="2">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>

                    <Border x:Name="PART_TimeMarker" Grid.Column="0" Width="5" HorizontalAlignment="Left" Background="{Binding Path=TimeMarker.TimeMarkerBrush}" Visibility="{Binding Path=TimeMarker, Converter={StaticResource NullToVisibilityConverter}}" />

                    <Path Grid.Column="1" Data="M-919.69031,2003.9496 L-919.69031,2010.7375 L-923.7619,2007.4564 z" Fill="{StaticResource AppointmentItemIndicatorFill}" Margin="4 0 2 0"
                      HorizontalAlignment="Left" Height="7" Stretch="Fill" VerticalAlignment="Center" Width="4" Visibility="{TemplateBinding StartIndicatorVisibility}"/>

                    <StackPanel Grid.Column="2" VerticalAlignment="Top" Margin="0 3 0 0">
                        <Image x:Name="RecurrenceMark" Grid.Column="0" Margin="2 1 1 0" Width="10" Height="10" Visibility="{Binding Path=RecurrenceState, Converter={StaticResource RecurrenceStateIsExeptionToVisibilityConverter}}" HorizontalAlignment="Left" Source="{StaticResource AppointmentItem_Recurrence}" />
                        <Image x:Name="ExceptionMark" Grid.Column="0" Margin="2 1 1 0" Width="10" Height="10" Visibility="{Binding Path=RecurrenceState, Converter={StaticResource RecurrenceStateIsOccurenceToVisibilityConverter}}" HorizontalAlignment="Left" Source="{StaticResource AppointmentItem_Exception}" />
                    </StackPanel>

                    <ContentPresenter Grid.Column="3" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />

                    <Path Grid.Column="4" Data="M1109.0469,332.70313 L1113.0469,336.29663 L1109.0469,339.68823 z" Margin="2 0 4 0" Fill="{StaticResource AppointmentItemIndicatorFill}"
                      HorizontalAlignment="Right" Height="6.984" Stretch="Fill" VerticalAlignment="Center" Width="4" Visibility="{TemplateBinding EndIndicatorVisibility}"/>
                </Grid>

                <Grid x:Name="MouseOverOverlay" Visibility="Collapsed" Opacity="0">
                    <Border x:Name="PART_StartResizeGrip" Background="Transparent" HorizontalAlignment="Left" VerticalAlignment="Stretch" Cursor="SizeWE" dragDrop:DragDropManager.AllowDrag="True"
						Visibility="{Binding IsAllDay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
                        <StackPanel x:Name="StartResizeGrip" Margin="1" 
								HorizontalAlignment="Center" VerticalAlignment="Center">
                            <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
									BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
									BorderThickness="0,0,1,1"
									Width="3" Height="3" Margin="1" />
                            <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
									BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
									BorderThickness="0,0,1,1"
									Width="3" Height="3" Margin="1" />
                            <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
									BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
									BorderThickness="0,0,1,1"
									Width="3" Height="3" Margin="1" />
                        </StackPanel>
                    </Border>
                    <Border x:Name="PART_EndResizeGrip" Background="Transparent" HorizontalAlignment="Right" VerticalAlignment="Stretch" Cursor="SizeWE" dragDrop:DragDropManager.AllowDrag="True"
						Visibility="{Binding IsAllDay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
                        <StackPanel x:Name="EndResizeGrip" Margin="1" HorizontalAlignment="Center" VerticalAlignment="Center">
                            <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
								BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
								BorderThickness="0,0,1,1"
								Width="3" Height="3" Margin="1" />
                            <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
								BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
								BorderThickness="0,0,1,1"
								Width="3" Height="3" Margin="1" />
                            <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
								BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
								BorderThickness="0,0,1,1"
								Width="3" Height="3" Margin="1" />
                        </StackPanel>
                    </Border>
                    <telerik:RadButton x:Name="DeleteButton" Width="11" Height="11" Margin="5 5 6 5" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" 
							Command="local:RadScheduleViewCommands.DeleteAppointment"  ClickMode="Press"
							CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
							Visibility="{Binding RelativeSource={RelativeSource Self}, Path=IsEnabled, Converter={StaticResource BooleanToVisibilityConverter}}"
							IsTabStop="False"
							telerik:StyleManager.Theme="{StaticResource Theme}">
                        <Path Stroke="{StaticResource AppointmentItemDeleteIconStroke}" Data="M0,0 L5,5 M5,0 L0,5" />
                    </telerik:RadButton>
                </Grid>
            </Grid>
        </Grid>

    </ControlTemplate>

    <ControlTemplate x:Key="AppointmentItemVerticalControlTemplate" TargetType="local:AppointmentItem">
        <Grid x:Name="Root">

            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled" />
                    <VisualState x:Name="Normal">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0:0:0.200" Storyboard.TargetName="MouseOverOverlay" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0.200">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation BeginTime="0:0:0.0" Duration="0:0:0.200" To="0" Storyboard.TargetName="MouseOverOverlay" Storyboard.TargetProperty="Opacity" />
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0:0:0.400" Storyboard.TargetName="MouseOverOverlay" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0.0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation BeginTime="0:0:0.200" Duration="0:0:0.200" To="1" Storyboard.TargetName="MouseOverOverlay" Storyboard.TargetProperty="Opacity" />
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="ReadOnly">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0:0:0.0" Storyboard.TargetName="ReadOnlyVisual" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0.0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="InlineEditing" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="SelectionStates">
                    <VisualState x:Name="Unselected" />
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CommonStatesVisual" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CommonStatesVisual" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource AppointmentItemBackground_Selected}" />
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CommonStatesVisual" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource AppointmentItemOuterBorder_Selected}" />
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CommonStatesVisualInnerBorder" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource AppointmentItemInnerBorder_Selected}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>


            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <!-- small appointment rending visual-->
            <Border x:Name="DurationMarkerVisual" Visibility="{TemplateBinding DurationMarkerVisibility}" Margin="{TemplateBinding DurationMarkerMargin}">
                <Border Background="{StaticResource AppointmentItemOuterBorder}" Margin="0 0 -1 0" CornerRadius="1 0 0 1" Width="4" />
            </Border>

            <Grid Grid.Column="1">


                <telerik:CommandManager.InputBindings>
                    <telerik:InputBindingCollection>
                        <telerik:MouseBinding Gesture="LeftDoubleClick" Command="local:RadScheduleViewCommands.EditAppointment" />
                    </telerik:InputBindingCollection>
                </telerik:CommandManager.InputBindings>


                <Border CornerRadius="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                    <Border CornerRadius="1" BorderBrush="{StaticResource AppointmentItemInnerBorder}" BorderThickness="{TemplateBinding BorderThickness}" />
                </Border>

                <Border x:Name="CommonStatesVisual" Visibility="Collapsed" CornerRadius="2" Background="{StaticResource AppointmentItemBackground_MouseOver}" BorderBrush="{StaticResource AppointmentItemOuterBorder_MouseOver}" BorderThickness="{TemplateBinding BorderThickness}">
                    <Border x:Name="CommonStatesVisualInnerBorder" CornerRadius="1" BorderBrush="{StaticResource AppointmentItemInnerBorder_MouseOver}" BorderThickness="{TemplateBinding BorderThickness}" />
                </Border>

                <Border x:Name="PART_Category" Margin="2" Background="{Binding Path=Category.CategoryBrush}" />

                <Rectangle x:Name="ReadOnlyVisual" Margin="2" Visibility="Collapsed" Fill="{StaticResource AppoinmtentItemBackground_ReadOnly}" />

                <Grid Margin="2">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                    <Border x:Name="PART_TimeMarker" Grid.Column="0" Grid.RowSpan="3" Width="5" HorizontalAlignment="Left" Background="{Binding Path=TimeMarker.TimeMarkerBrush}" Visibility="{Binding Path=TimeMarker, Converter={StaticResource NullToVisibilityConverter}}" />

                    <Path Grid.ColumnSpan="3" Grid.Row="0" Data="M3.5,0 L7,4 L0,4 z" Fill="{StaticResource AppointmentItemIndicatorFill}" Margin="2 4 2 2"
                      Height="4" Width="7" VerticalAlignment="Top" Stretch="Fill" HorizontalAlignment="Center" Visibility="{TemplateBinding StartIndicatorVisibility}" />

                    <StackPanel Grid.Column="1" Grid.Row="1" VerticalAlignment="Top" Margin="0 3 0 0">
                        <Image x:Name="RecurrenceMark" Grid.Column="0" Margin="2 1 1 0" Width="10" Height="10" Visibility="{Binding Path=RecurrenceState, Converter={StaticResource RecurrenceStateIsExeptionToVisibilityConverter}}" HorizontalAlignment="Left" Source="{StaticResource AppointmentItem_Recurrence}" />
                        <Image x:Name="ExceptionMark" Grid.Column="0" Margin="2 1 1 0" Width="10" Height="10" Visibility="{Binding Path=RecurrenceState, Converter={StaticResource RecurrenceStateIsOccurenceToVisibilityConverter}}" HorizontalAlignment="Left" Source="{StaticResource AppointmentItem_Exception}" />
                    </StackPanel>

                    <ContentPresenter Grid.Column="2" Grid.Row="1" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />

                    <Path Grid.ColumnSpan="3" Grid.Row="2" Data="M7,0 L3.5,4 L0,0 z" Height="4" Width="7" Stretch="Fill" Fill="{StaticResource AppointmentItemIndicatorFill}" Margin="2 2 2 4"
                      VerticalAlignment="Bottom" HorizontalAlignment="Center" Visibility="{TemplateBinding EndIndicatorVisibility}"/>
                </Grid>

                <Grid x:Name="MouseOverOverlay" Visibility="Collapsed" Opacity="0">
                    <Border x:Name="PART_StartResizeGrip" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Top" Cursor="SizeNS" dragDrop:DragDropManager.AllowDrag="True" 
						Visibility="{Binding IsAllDay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
                        <StackPanel x:Name="StartResizeGrip" Margin="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                            <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
							BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
							BorderThickness="0,0,1,1"
							Width="3" Height="3" Margin="1" />
                            <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
								BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
								BorderThickness="0,0,1,1"
								Width="3" Height="3" Margin="1" />
                            <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
								BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
								BorderThickness="0,0,1,1"
								Width="3" Height="3" Margin="1" />
                        </StackPanel>
                    </Border>
                    <Border x:Name="PART_EndResizeGrip" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Cursor="SizeNS" dragDrop:DragDropManager.AllowDrag="True"
						Visibility="{Binding IsAllDay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
                        <StackPanel x:Name="EndResizeGrip" Margin="1" Orientation="Horizontal"  HorizontalAlignment="Center" VerticalAlignment="Center">
                            <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
								BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
								BorderThickness="0,0,1,1"
								Width="3" Height="3" Margin="1" />
                            <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
								BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
								BorderThickness="0,0,1,1"
								Width="3" Height="3" Margin="1" />
                            <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
								BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
								BorderThickness="0,0,1,1"
								Width="3" Height="3" Margin="1" />
                        </StackPanel>
                    </Border>
                    <telerik:RadButton x:Name="DeleteButton" Width="11" Height="11" Margin="5 5 6 5" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top"
							Command="local:RadScheduleViewCommands.DeleteAppointment" ClickMode="Press"   
							CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}" 
							Visibility="{Binding RelativeSource={RelativeSource Self}, Path=IsEnabled, Converter={StaticResource BooleanToVisibilityConverter}}"
							IsTabStop="False"
							telerik:StyleManager.Theme="{StaticResource Theme}">
                        <Path Stroke="{StaticResource AppointmentItemDeleteIconStroke}" Data="M0,0 L5,5 M5,0 L0,5" />
                    </telerik:RadButton>
                </Grid>
            </Grid>
        </Grid>


    </ControlTemplate>

    <DataTemplate x:Key="AppointmentItemTemplate">
        <TextBlock Text="{Binding Subject}" TextWrapping="Wrap" TextTrimming="WordEllipsis" dragDrop:DragDropManager.AllowDrag="False" />
    </DataTemplate>
    <DataTemplate x:Key="InlineEditTemplate">
        <TextBox VerticalContentAlignment="Stretch" VerticalAlignment="Stretch" Text="{Binding Appointment.Subject, Mode=TwoWay}" TextWrapping="Wrap" telerik:StyleManager.Theme="{StaticResource Theme}" />
    </DataTemplate>
    <DataTemplate x:Key="ToolTipTemplate">
        <StackPanel Orientation="Horizontal">
            <StackPanel x:Name="HighImportanceMark" Grid.Column="1" VerticalAlignment="Top" Visibility="{Binding Importance, Converter={StaticResource EnumToVisibilityConverter}, ConverterParameter=High}" Margin="0 1 3 1">
                <Path Stretch="Fill" Width="5.451" Height="10" HorizontalAlignment="Center" VerticalAlignment="Top" Data="M200.39647,58.840393 C200.39337,58.336426 201.14566,57.683922 202.56244,57.684292 C204.06589,57.684685 204.73764,58.357765 204.72783,58.992363 C205.04649,61.795574 203.04713,64.181099 202.47388,66.133446 C201.93753,64.154961 199.9471,61.560352 200.39647,58.840393 z">
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="1.059,0.375" StartPoint="-0.457,0.519">
                            <GradientStop Color="#FFFF0606" Offset="0.609" />
                            <GradientStop Color="#FFBF0303" Offset="0.927" />
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <Ellipse Height="3" HorizontalAlignment="Center" Margin="0,-1,0,0" VerticalAlignment="Top" Width="3">
                    <Ellipse.Fill>
                        <RadialGradientBrush>
                            <GradientStop Color="#FFFF0606" Offset="0" />
                            <GradientStop Color="#FFBF0303" Offset="1" />
                        </RadialGradientBrush>
                    </Ellipse.Fill>
                </Ellipse>
            </StackPanel>
            <Path x:Name="LowImportanceMark" Margin="0 1 3 1" Grid.Column="1" Width="9" Height="12" VerticalAlignment="Top" Stretch="Fill" Stroke="#FF0365A7" Visibility="{Binding Importance, Converter={StaticResource EnumToVisibilityConverter}, ConverterParameter=Low}" Data="M222.40353,60.139881 L226.65768,60.139843 L226.63687,67.240196 L229.15347,67.240196 L224.37816,71.394943 L219.65274,67.240196 L222.37572,67.219345 z">
                <Path.Fill>
                    <LinearGradientBrush EndPoint="1.059,0.375" StartPoint="-0.457,0.519">
                        <GradientStop Color="#FFBBE4FF" />
                        <GradientStop Color="#FF024572" Offset="0.836" />
                        <GradientStop Color="#FF43ADF4" Offset="0.466" />
                    </LinearGradientBrush>
                </Path.Fill>
            </Path>
            <TextBlock Text="{Binding Subject}" TextWrapping="Wrap" MaxWidth="200" />
        </StackPanel>
    </DataTemplate>

    <local:AppointmentItemContentTemplateSelector x:Key="AppointmentItemTemplateSelector" DefaultTemplate="{StaticResource AppointmentItemTemplate}" />

    <Style x:Key="AppointmentItemBaseStyle" TargetType="local:AppointmentItem">
        <Setter Property="Background" Value="{StaticResource AppointmentItemBackground}" />
        <Setter Property="BorderBrush" Value="{StaticResource AppointmentItemOuterBorder}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Foreground" Value="{StaticResource RadScheduleForeground}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="2 0 0 0" />


        <Setter Property="ContentTemplate" Value="{StaticResource AppointmentItemTemplate}" />

        <Setter Property="Template" Value="{StaticResource AppointmentItemHorizontalControlTemplate}" />


        <Setter Property="Canvas.ZIndex" Value="1" />

    </Style>

    <local:OrientedAppointmentItemStyleSelector x:Key="AppointmentItemStyleSelector">
        <local:OrientedAppointmentItemStyleSelector.MonthViewStyle>
            <Style TargetType="local:AppointmentItem" BasedOn="{StaticResource AppointmentItemBaseStyle}">
                <Setter Property="Margin" Value="2 1 2 0" />
            </Style>
        </local:OrientedAppointmentItemStyleSelector.MonthViewStyle>
        <local:OrientedAppointmentItemStyleSelector.HorizontalStyle>
            <Style TargetType="local:AppointmentItem" BasedOn="{StaticResource AppointmentItemBaseStyle}">
                <Setter Property="Margin" Value="0 1 0 0" />
            </Style>
        </local:OrientedAppointmentItemStyleSelector.HorizontalStyle>
        <local:OrientedAppointmentItemStyleSelector.VerticalStyle>
            <Style TargetType="local:AppointmentItem" BasedOn="{StaticResource AppointmentItemBaseStyle}">
                <Setter Property="Template" Value="{StaticResource AppointmentItemVerticalControlTemplate}" />
                <Setter Property="Margin" Value="1 0 0 0" />
            </Style>
        </local:OrientedAppointmentItemStyleSelector.VerticalStyle>
    </local:OrientedAppointmentItemStyleSelector>

    <DataTemplate x:Key="DragVisualCueItemTemplate">
        <Grid>
            <Border Background="{StaticResource AppointmentItemBackground_Drag}" 
					BorderBrush="{StaticResource AppointmentItemOuterBorder_Drag}" BorderThickness="1" CornerRadius="2">
                <Border BorderBrush="{StaticResource AppointmentItemInnerBorder_Drag}" BorderThickness="1" />
            </Border>
            <TextBlock Margin="8 2 8 2" Text="{Binding Subject}" Foreground="{StaticResource RadScheduleForeground}" TextWrapping="Wrap" TextTrimming="WordEllipsis" />
        </Grid>
    </DataTemplate>

    <!-- Highlights -->
    <Style x:Key="HighlightItemStyle" TargetType="local:HighlightItem">
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{x:Null}" />
        <Setter Property="Background" Value="{StaticResource DecorationRectangleBackground}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:HighlightItem">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ResizeHighlightStyle" TargetType="local:HighlightItem">
        <Setter Property="Background" Value="{StaticResource DecorationRectangleBackground_DragOver}" />
        <Setter Property="BorderBrush" Value="{StaticResource DecorationRectangleOuterBorder_DragOver}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid>
                            <Border BorderBrush="{StaticResource DecorationRectangleInnerBorder_DragOver}" BorderThickness="1" />
                            <Path Width="8" Height="8" Margin="-2" HorizontalAlignment="Left" VerticalAlignment="Top"  Stroke="{StaticResource AppointmentResizeCueTopLeftMarkStroke}">
                                <Path.Data>
                                    <GeometryGroup>
                                        <EllipseGeometry RadiusX="2" RadiusY="2" Center="2 2" />
                                        <LineGeometry StartPoint="3 3" EndPoint="8 8" />
                                    </GeometryGroup>
                                </Path.Data>
                            </Path>

                            <TextBlock x:Name="StartTextBox" Margin="4 2" Foreground="{StaticResource RadScheduleForeground}" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding ActualStart,StringFormat=t}" />
                            <Path Width="8" Height="8" Margin="-2" HorizontalAlignment="Right" VerticalAlignment="Bottom"  Stroke="{StaticResource AppointmentResizeCueBottomRightMarkStroke}">
                                <Path.Data>
                                    <GeometryGroup>
                                        <EllipseGeometry RadiusX="2" RadiusY="2" Center="6 6" />
                                        <LineGeometry StartPoint="0 0" EndPoint="5 5" />
                                    </GeometryGroup>
                                </Path.Data>
                            </Path>
                            <TextBlock x:Name="EndTextBox" Margin="4 2" Foreground="{StaticResource RadScheduleForeground}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Text="{Binding ActualEnd,StringFormat=t}" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="DragDropHighlightStyle" TargetType="local:HighlightItem">
        <Setter Property="Background" Value="{StaticResource DecorationRectangleBackground_DragOver}" />
        <Setter Property="BorderBrush" Value="{StaticResource DecorationRectangleOuterBorder_DragOver}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid>
                            <Border BorderBrush="{StaticResource DecorationRectangleInnerBorder_DragOver}" BorderThickness="1" />
                            <Path Width="8" Height="8" Margin="-2" HorizontalAlignment="Left" VerticalAlignment="Top"  Stroke="{StaticResource AppointmentResizeCueTopLeftMarkStroke}">
                                <Path.Data>
                                    <GeometryGroup>
                                        <EllipseGeometry RadiusX="2" RadiusY="2" Center="2 2" />
                                        <LineGeometry StartPoint="3 3" EndPoint="8 8" />
                                    </GeometryGroup>
                                </Path.Data>
                            </Path>

                            <TextBlock x:Name="StartTextBox" Margin="4 2" Foreground="{StaticResource RadScheduleForeground}" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding ActualStart,StringFormat=t}" />

                            <Path Width="8" Height="8" Margin="-2" HorizontalAlignment="Right" VerticalAlignment="Bottom"  Stroke="{StaticResource AppointmentResizeCueBottomRightMarkStroke}">
                                <Path.Data>
                                    <GeometryGroup>
                                        <EllipseGeometry RadiusX="2" RadiusY="2" Center="6 6" />
                                        <LineGeometry StartPoint="0 0" EndPoint="5 5" />
                                    </GeometryGroup>
                                </Path.Data>
                            </Path>
                            <TextBlock x:Name="EndTextBox" Margin="4 2" Foreground="{StaticResource RadScheduleForeground}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Text="{Binding ActualEnd,StringFormat=t}" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="MouseOverHighlightStyle" TargetType="local:HighlightItem">
        <Setter Property="Background" Value="{StaticResource DecorationRectangleBackground_MouseOver}" />
        <Setter Property="BorderBrush" Value="{StaticResource DecorationRectangleOuterBorder_MouseOver}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Border BorderBrush="{StaticResource DecorationRectangleInnerBorder_MouseOver}" BorderThickness="1" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="SelectionHighlightStyle" TargetType="local:HighlightItem">
        <Setter Property="Background" Value="{StaticResource DecorationRectangleBackground_Selected}" />
        <Setter Property="BorderBrush" Value="{StaticResource DecorationRectangleOuterBorder_Selected}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Border BorderBrush="{StaticResource DecorationRectangleInnerBorder_Selected}" BorderThickness="1" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <local:SpecialSlotStyleSelector x:Key="SpecialSlotStyleSelector">
        <local:SpecialSlotStyleSelector.DefaultStyle>
            <Style TargetType="local:HighlightItem" BasedOn="{StaticResource HighlightItemStyle}">
                <Setter Property="BorderThickness" Value="0" />
                <Setter Property="Background" Value="{StaticResource SpecialSlotBackground}" />
            </Style>
        </local:SpecialSlotStyleSelector.DefaultStyle>
        <local:SpecialSlotStyleSelector.ReadOnlyStyle>
            <Style TargetType="local:HighlightItem" BasedOn="{StaticResource HighlightItemStyle}">
                <Setter Property="BorderThickness" Value="0" />
                <Setter Property="Background" Value="{StaticResource SpecialSlotBackground_ReadOnly}" />
            </Style>
        </local:SpecialSlotStyleSelector.ReadOnlyStyle>
    </local:SpecialSlotStyleSelector>

    <!-- ViewModeSelection -->
    <Style x:Key="ViewModeSelectionListBoxItemStyle" TargetType="ListBoxItem">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Margin" Value="2" />
        <Setter Property="Padding" Value="6 3" />
        <Setter Property="MinWidth" Value="84" />
        <Setter Property="Foreground" Value="{StaticResource ViewModeButtonForeground}"  />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Grid>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(ContentControl.Foreground)">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonForeground_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonOuterBorder_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonBackground_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckInnerBorder" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonInnerBorder_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(ContentControl.Foreground)">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonForeground_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonOuterBorder_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonBackground_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckInnerBorder" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonInnerBorder_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="CheckOuterBorder" CornerRadius="1" BorderThickness="1" BorderBrush="{StaticResource ViewModeButtonOuterBorder}" Background="{StaticResource ViewModeButtonBackground}">
                            <Rectangle x:Name="CheckInnerBorder"  Stroke="{StaticResource ViewModeButtonInnerBorder}" />
                        </Border>


                        <ContentControl x:Name="Content" Foreground="{TemplateBinding Foreground}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}" telerik:LocalizationManager.ResourceKey="{Binding Title}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />

                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ViewModeSelectionListBoxStyle" TargetType="ListBox">
        <Setter Property="BorderBrush" Value="{x:Null}" />
        <Setter Property="Background" Value="{x:Null}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Margin" Value="2" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource ViewModeSelectionListBoxItemStyle}" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBox">
                    <ScrollViewer x:Name="ScrollViewer" Margin="0" ScrollViewer.VerticalScrollBarVisibility="Auto"
								  Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" 
								  BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <ItemsPresenter />
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <telerikPrimitives:RadUniformGrid Rows="1" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ScheduleView -->
    <!-- Navigation -->
    <Style x:Key="NavigationButtonBaseStyle" TargetType="FrameworkElement">
        <Setter Property="Margin" Value="2" />
        <Setter Property="Width" Value="22" />
        <Setter Property="Height" Value="22" />

        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>
    <Style x:Key="NavigationButtonBackStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource NavigationButtonBaseStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Grid>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconForeground" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NavigationIconForeground_Highlighted}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconBackground" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NavigationIconBackground_Highlighted}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonOuterBorder_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonBackground_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckInnerBorder" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonInnerBorder_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconForeground" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NavigationIconForeground_Highlighted}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconBackground" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NavigationIconBackground_Highlighted}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonOuterBorder_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonBackground_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckInnerBorder" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonInnerBorder_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="CheckOuterBorder" CornerRadius="1" BorderThickness="1" BorderBrush="{StaticResource ViewModeButtonOuterBorder}" Background="{StaticResource ViewModeButtonBackground}">
                            <Rectangle x:Name="CheckInnerBorder"  Stroke="{StaticResource ViewModeButtonInnerBorder}" />
                        </Border>
                        <Path x:Name="IconBackground" Width="4" Height="7" Margin="0 1 0 0" Fill="{StaticResource NavigationIconBackground_Normal}" Data="M4,0 L0,3.5 4,7 Z" />
                        <Path x:Name="IconForeground" Width="4" Height="7" Margin="0 0 0 1" Fill="{StaticResource NavigationIconForeground_Normal}" Data="M4,0 L0,3.5 4,7 Z" />
                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="NavigationButtonNextStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource NavigationButtonBaseStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Grid>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconForeground" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NavigationIconForeground_Highlighted}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconBackground" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NavigationIconBackground_Highlighted}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonOuterBorder_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonBackground_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckInnerBorder" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonInnerBorder_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconForeground" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NavigationIconForeground_Highlighted}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconBackground" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NavigationIconBackground_Highlighted}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonOuterBorder_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonBackground_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckInnerBorder" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonInnerBorder_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="CheckOuterBorder" CornerRadius="1" BorderThickness="1" BorderBrush="{StaticResource ViewModeButtonOuterBorder}" Background="{StaticResource ViewModeButtonBackground}">
                            <Rectangle x:Name="CheckInnerBorder" Stroke="{StaticResource ViewModeButtonInnerBorder}" />
                        </Border>
                        <Path x:Name="IconBackground" Width="4" Height="7" Margin="0 1 0 0" Fill="{StaticResource NavigationIconBackground_Normal}" Data="M0,0 L4,3.5 0,7 Z" />
                        <Path x:Name="IconForeground" Width="4" Height="7" Margin="0 0 0 1" Fill="{StaticResource NavigationIconForeground_Normal}" Data="M0,0 L4,3.5 0,7 Z" />
                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="NavigationCalendarToggleButton" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource NavigationButtonBaseStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadDropDownButton">
                    <Grid>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CalendarIcon" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NavigationIconForeground_Highlighted}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CalendarIcon" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NavigationIconBackground_Highlighted}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonOuterBorder_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonBackground_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckInnerBorder" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonInnerBorder_MouseOver}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CalendarIcon" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NavigationIconForeground_Highlighted}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CalendarIcon" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NavigationIconBackground_Highlighted}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonOuterBorder_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonBackground_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckInnerBorder" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonInnerBorder_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Opened">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CalendarIcon" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NavigationIconForeground_Highlighted}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CalendarIcon" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NavigationIconBackground_Highlighted}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonOuterBorder_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckOuterBorder" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonBackground_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckInnerBorder" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ViewModeButtonInnerBorder_Pressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="CheckOuterBorder" CornerRadius="1" BorderThickness="1" BorderBrush="{StaticResource ViewModeButtonOuterBorder}" Background="{StaticResource ViewModeButtonBackground}">
                            <Rectangle x:Name="CheckInnerBorder"  Stroke="{StaticResource ViewModeButtonInnerBorder}" />
                        </Border>
                        <ContentControl x:Name="CalendarIcon" IsTabStop="False" Margin="0 0 0 1"  HorizontalContentAlignment="Center" Template="{StaticResource CalendarIcon}" Background="{StaticResource NavigationIconBackground_Normal}" Foreground="{StaticResource NavigationIconForeground_Normal}" />
                        <Popup x:Name="DropDownPopup"  IsOpen="{Binding Path=IsOpen, RelativeSource={RelativeSource TemplatedParent}}">
                            <ContentPresenter x:Name="DropDownPopupContent" Content="{TemplateBinding DropDownContent}" ContentTemplate="{TemplateBinding DropDownContentTemplate}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                        </Popup>
                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="NavigationDateTimePickerStyle" TargetType="telerik:RadDatePicker">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadDatePicker">
                    <telerik:RadDropDownButton Style="{StaticResource NavigationCalendarToggleButton}" DropDownIndicatorVisibility="Collapsed" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                        <telerik:RadDropDownButton.DropDownContent>
                            <telerik:RadCalendar x:Name="PART_Calendar" IsReadOnly="{TemplateBinding IsReadOnly}" DateSelectionMode="{TemplateBinding DateSelectionMode}" Culture="{TemplateBinding Culture}" SelectionMode="Single" DisplayDateStart="{TemplateBinding DisplayDateStart}" DisplayDateEnd="{TemplateBinding DisplayDateEnd}" SelectableDateStart="{TemplateBinding SelectableDateStart}" SelectableDateEnd="{TemplateBinding SelectableDateEnd}" DisplayDate="{Binding DisplayDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" SelectedDate="{Binding SelectedDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                        </telerik:RadDropDownButton.DropDownContent>
                    </telerik:RadDropDownButton>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="NavigationIntervalStyle" TargetType="ContentControl">
        <Setter Property="Margin" Value="5" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <TextBlock Margin="0 1 0 0" Text="{Binding}" Foreground="{StaticResource NavigationIntervalForegroundRear}" />
                        <TextBlock Margin="0 0 0 1" Text="{Binding}" Foreground="{StaticResource NavigationIntervalForegroundFront}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <DataTemplate x:Key="DragVisualContentTemplate">
        <TextBlock Text="{Binding Converter={StaticResource DraggedAppointmentsToLocalizedStringConverter}}" TextWrapping="Wrap" MaxWidth="200" MaxHeight="66" TextTrimming="WordEllipsis" />
    </DataTemplate>

    <Style TargetType="local:DragVisual" x:Key="DragVisualStyle" >
        <Setter Property="Foreground" Value="{StaticResource DragVisualForeground}" />
        <Setter Property="BorderBrush" Value="{StaticResource DragVisualBorder}" />
        <Setter Property="Background" Value="{StaticResource DragVisualBackground}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Padding" Value="0 0 6 0" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Center" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:DragVisual">
                    <Grid>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="EffectStates">
                                <VisualState x:Name="None">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NoneEffect" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Move">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MoveEffect" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Copy">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CopyEffect" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Link">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LinkEffect" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Scroll">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ScrollEffect" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="SecondItemVisual" Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=DraggedItemsSource, Converter={StaticResource EnumerableCountToVisibilityConverter}, ConverterParameter=3}" CornerRadius="2" Margin="4 4 0 0" BorderBrush="{StaticResource DragVisualMultyItemBorder}" Background="{StaticResource DragVisualMultyItemBackground}" BorderThickness="1" />
                        <Border x:Name="ThirdthItemVisual" Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=DraggedItemsSource, Converter={StaticResource EnumerableCountToVisibilityConverter}, ConverterParameter=2}" CornerRadius="2" Margin="2 2 2 2" BorderBrush="{StaticResource DragVisualMultyItemBorder}" Background="{StaticResource DragVisualMultyItemBackground}" BorderThickness="1" />
                        <Border x:Name="DragBackgroundVisual" CornerRadius="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" />
                        <Border Padding="{TemplateBinding BorderThickness}">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>

                                <Path x:Name="NoneEffect" Visibility="Collapsed" Margin="10 3 2 5" Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top" Data="M2,8 L8,2 M9,5 C9,7.2 7.2,9 5,9 C2.7,9 1,7 1,5 C1,2.8 2.8,1 5,1 C7.2,1 9,2.8 9,5 z" Stroke="{StaticResource DragVisualEffectImportant}" StrokeThickness="2" />
                                <Path x:Name="MoveEffect" Visibility="Collapsed" Margin="10 3 2 5" Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top" Data="M0,5 L8,5 M4,1 L8,5 4,9" Stroke="{StaticResource DragVisualEffectNormal}" StrokeThickness="2" />
                                <Path x:Name="CopyEffect" Visibility="Collapsed" Margin="10 3 2 5" Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top" Data="M5,1 L5,9 M1,5 L9,5" Stroke="{StaticResource DragVisualEffectNormal}" StrokeThickness="2" />
                                <Path x:Name="LinkEffect" Visibility="Collapsed" Margin="10 7 4 7" Height="6" Width="11" HorizontalAlignment="Left" VerticalAlignment="Top" Data="M8,0.5 C9.4,0.5 10.5,1.6 10.5,3 C10.5,4.4 9.4,5.5 8,5.5 C6.6,5.5 5.5,4.4 5.5,3 C5.5,1.6 6.6,0.5 8,0.5 z M3,0.5 C4.4,0.5 5.5,1.6 5.5,3 C5.5,4.4 4.4,5.5 3,5.5 C1.6,5.5 0.5,4.4 0.5,3 C0.5,1.6 1.6,0.5 3,0.5 z" Stroke="{StaticResource DragVisualEffectImportant}" StrokeThickness="1" />
                                <Path x:Name="ScrollEffect" Visibility="Collapsed" Margin="10 4 5 4" Width="10" Height="12" HorizontalAlignment="Left" VerticalAlignment="Top" Data="M0,5 L5,0 10,5Z M0,7 L5,12 10,7Z" Fill="{StaticResource DragVisualEffectNormal}" />

                                <ContentPresenter x:Name="Content" Grid.Column="1" Margin="{TemplateBinding Padding}" Content="{TemplateBinding DraggedItemsSource}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                            </Grid>
                        </Border>
                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="VerticalScrollBarStyle" TargetType="ScrollBar">
        <Setter Property="MinWidth" Value="17"/>
        <Setter Property="MinHeight" Value="17"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollBar">
                    <Grid x:Name="Root">
                        <Grid.Resources>
                            <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root" Background="Transparent">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="HorizontalIncrementTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundAnimation"/>
                                                    <ColorAnimation Duration="0" To="#7FFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#CCFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F2FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundAnimation"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight"/>
                                                    <ColorAnimation Duration="0" To="#6BFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#C6FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#EAFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F4FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To=".7" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledElement"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background" Fill="#FF1F3B53" Opacity="0" RadiusY="2" RadiusX="2" StrokeThickness="1">
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
                                                <GradientStop Color="#FF647480" Offset="1"/>
                                                <GradientStop Color="#FFAEB7BF" Offset="0"/>
                                                <GradientStop Color="#FF919EA7" Offset="0.35"/>
                                                <GradientStop Color="#FF7A8A99" Offset="0.35"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Rectangle x:Name="BackgroundAnimation" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1"/>
                                    <Rectangle x:Name="BackgroundGradient" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FFFFFFFF" StrokeThickness="1">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                <GradientStop Color="#E5FFFFFF" Offset="0.603"/>
                                                <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Rectangle x:Name="Highlight" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FF6DBDD1" StrokeThickness="1"/>
                                    <Path Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z " Height="8" Stretch="Uniform" Width="4">
                                        <Path.Fill>
                                            <SolidColorBrush x:Name="ButtonColor" Color="#FF333333"/>
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement" Fill="#FFFFFFFF" Opacity="0" RadiusY="2" RadiusX="2"/>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="HorizontalDecrementTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundMouseOver"/>
                                                    <ColorAnimation Duration="0" To="#7FFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#CCFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F2FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundPressed"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight"/>
                                                    <ColorAnimation Duration="0" To="#6BFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#C6FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#EAFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F4FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To=".7" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledElement"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background" Fill="#FF1F3B53" Opacity="0" RadiusY="2" RadiusX="2" StrokeThickness="1">
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
                                                <GradientStop Color="#FF647480" Offset="1"/>
                                                <GradientStop Color="#FFAEB7BF" Offset="0"/>
                                                <GradientStop Color="#FF919EA7" Offset="0.35"/>
                                                <GradientStop Color="#FF7A8A99" Offset="0.35"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Rectangle x:Name="BackgroundMouseOver" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1"/>
                                    <Rectangle x:Name="BackgroundPressed" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1"/>
                                    <Rectangle x:Name="BackgroundGradient" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FFFFFFFF" StrokeThickness="1">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                <GradientStop Color="#E5FFFFFF" Offset="0.603"/>
                                                <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Rectangle x:Name="Highlight" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FF6DBDD1" StrokeThickness="1"/>
                                    <Path Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z " Height="8" Stretch="Uniform" Width="4">
                                        <Path.Fill>
                                            <SolidColorBrush x:Name="ButtonColor" Color="#FF333333"/>
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement" Fill="#FFFFFFFF" Opacity="0" RadiusY="2" RadiusX="2"/>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalIncrementTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundMouseOver"/>
                                                    <ColorAnimation Duration="0" To="#7FFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#CCFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F2FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundPressed"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight"/>
                                                    <ColorAnimation Duration="0" To="#6BFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#C6FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#EAFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F4FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To=".7" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledElement"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background" Fill="#FF1F3B53" Opacity="0" RadiusY="2" RadiusX="2" StrokeThickness="1" Visibility="Collapsed">
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush EndPoint="1,.5" StartPoint="0,.5">
                                                <GradientStop Color="#FF647480" Offset="1"/>
                                                <GradientStop Color="#FFAEB7BF" Offset="0"/>
                                                <GradientStop Color="#FF919EA7" Offset="0.35"/>
                                                <GradientStop Color="#FF7A8A99" Offset="0.35"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Rectangle x:Name="BackgroundMouseOver" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1" Visibility="Collapsed"/>
                                    <Rectangle x:Name="BackgroundPressed" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1" Visibility="Collapsed"/>
                                    <Rectangle x:Name="BackgroundGradient" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FFFFFFFF" StrokeThickness="1" Visibility="Collapsed">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint="1,.7" StartPoint="0,.7">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                <GradientStop Color="#E5FFFFFF" Offset="0.603"/>
                                                <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Rectangle x:Name="Highlight" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FF6DBDD1" StrokeThickness="1" Visibility="Collapsed"/>
                                    <Path Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z " Height="4" Stretch="Uniform" Width="8">
                                        <Path.Fill>
                                            <SolidColorBrush x:Name="ButtonColor" Color="Gray"/>
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement" Fill="#FFFFFFFF" Opacity="0" RadiusY="2" RadiusX="2"/>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalDecrementTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundMouseOver"/>
                                                    <ColorAnimation Duration="0" To="#7FFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#CCFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F2FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundPressed"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight"/>
                                                    <ColorAnimation Duration="0" To="#6BFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#C6FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#EAFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F4FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To=".7" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledElement"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background" Fill="#FF1F3B53" Opacity="0" RadiusY="2" RadiusX="2" StrokeThickness="1" Visibility="Collapsed">
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush EndPoint="1,.5" StartPoint="0,.5">
                                                <GradientStop Color="#FF647480" Offset="1"/>
                                                <GradientStop Color="#FFAEB7BF" Offset="0"/>
                                                <GradientStop Color="#FF919EA7" Offset="0.35"/>
                                                <GradientStop Color="#FF7A8A99" Offset="0.35"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Rectangle x:Name="BackgroundMouseOver" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1" Visibility="Collapsed"/>
                                    <Rectangle x:Name="BackgroundPressed" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1" Visibility="Collapsed"/>
                                    <Rectangle x:Name="BackgroundGradient" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FFFFFFFF" StrokeThickness="1" Visibility="Collapsed">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint="1,.7" StartPoint="0,.7">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                <GradientStop Color="#E5FFFFFF" Offset="0.603"/>
                                                <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Rectangle x:Name="Highlight" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FF6DBDD1" StrokeThickness="1" Visibility="Collapsed"/>
                                    <Path Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z " Height="4" Stretch="Uniform" Width="8">
                                        <Path.Fill>
                                            <SolidColorBrush x:Name="ButtonColor" Color="Gray"/>
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement" Fill="#FFFFFFFF" Opacity="0" RadiusY="2" RadiusX="2"/>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalThumbTemplate" TargetType="Thumb">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundMouseOver"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundPressed"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ThumbVisual"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid x:Name="ThumbVisual" Margin="1,0,1,0">
                                        <Rectangle x:Name="Background" Fill="#FF1F3B53" RadiusY="7" RadiusX="7" StrokeThickness="1" Stroke="#FF3D3D3D"/>
                                        <Rectangle x:Name="BackgroundMouseOver" Fill="Gray" Opacity="0" RadiusY="7" RadiusX="7" Stroke="#FF3D3D3D" StrokeThickness="1"/>
                                        <Rectangle x:Name="BackgroundPressed" Fill="Gray" Opacity="0" RadiusY="7" RadiusX="7" Stroke="#FF3D3D3D" StrokeThickness="1"/>
                                        <Rectangle x:Name="BackgroundGradient" Margin="1" RadiusY="6" RadiusX="6" Stroke="#FF3D3D3D" StrokeThickness="1" Fill="Gray"/>
                                        <Rectangle x:Name="Highlight" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" StrokeThickness="1"/>
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="HorizontalThumbTemplate" TargetType="Thumb">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundMouseOver"/>
                                                    <ColorAnimation Duration="0" To="#7FFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#CCFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F2FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundPressed"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight"/>
                                                    <ColorAnimation Duration="0" To="#6BFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#C6FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#EAFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F4FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ThumbVisual"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid x:Name="ThumbVisual" Margin="0,1,0,1">
                                        <Rectangle x:Name="Background" Fill="#FF1F3B53" RadiusY="2" RadiusX="2" StrokeThickness="1">
                                            <Rectangle.Stroke>
                                                <LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
                                                    <GradientStop Color="#FF818F99" Offset="1"/>
                                                    <GradientStop Color="#FFC2C9CE" Offset="0"/>
                                                    <GradientStop Color="#FFB3BBC1" Offset="0.35"/>
                                                    <GradientStop Color="#FF96A4B1" Offset="0.35"/>
                                                </LinearGradientBrush>
                                            </Rectangle.Stroke>
                                        </Rectangle>
                                        <Rectangle x:Name="BackgroundMouseOver" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1"/>
                                        <Rectangle x:Name="BackgroundPressed" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1"/>
                                        <Rectangle x:Name="BackgroundGradient" Margin="1" RadiusY="1" RadiusX="1" Stroke="#FFFFFFFF" StrokeThickness="1">
                                            <Rectangle.Fill>
                                                <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                    <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                                    <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                    <GradientStop Color="#E5FFFFFF" Offset="0.603"/>
                                                    <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Rectangle.Fill>
                                        </Rectangle>
                                        <Rectangle x:Name="Highlight" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FF6DBDD1" StrokeThickness="1"/>
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="HorizontalRoot">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Rectangle Grid.ColumnSpan="5" RadiusY="1" RadiusX="1" Stroke="#00000000" StrokeThickness="1">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
                                        <GradientStop Color="#FFF4F6F7" Offset="0"/>
                                        <GradientStop Color="#FFF0F4F7" Offset="0.344"/>
                                        <GradientStop Color="#FFDFE3E6" Offset="1"/>
                                        <GradientStop Color="#FFE9EEF4" Offset="0.527"/>
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Rectangle Grid.ColumnSpan="5" Fill="{TemplateBinding Background}" RadiusY="1" RadiusX="1" Stroke="#00000000" StrokeThickness="1"/>
                            <Rectangle Grid.ColumnSpan="5" Opacity=".375" RadiusY="1" RadiusX="1" StrokeThickness="1">
                                <Rectangle.Stroke>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                                        <GradientStop Color="#FF718597" Offset="0.375"/>
                                        <GradientStop Color="#FF617584" Offset="1"/>
                                    </LinearGradientBrush>
                                </Rectangle.Stroke>
                            </Rectangle>
                            <Rectangle Grid.ColumnSpan="5" Margin="1" RadiusY="1" RadiusX="1">
                                <Rectangle.Stroke>
                                    <LinearGradientBrush EndPoint="0.5,.125" StartPoint=".5,.875">
                                        <GradientStop Color="#33FFFFFF"/>
                                        <GradientStop Color="#99FFFFFF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Rectangle.Stroke>
                            </Rectangle>
                            <RepeatButton x:Name="HorizontalSmallDecrease" Grid.Column="0" IsTabStop="False" Interval="50" Margin="1" Template="{StaticResource HorizontalDecrementTemplate}" Width="16"/>
                            <RepeatButton x:Name="HorizontalLargeDecrease" Grid.Column="1" IsTabStop="False" Interval="50" Template="{StaticResource RepeatButtonTemplate}" Width="0"/>
                            <Thumb x:Name="HorizontalThumb" Background="{TemplateBinding Background}" Grid.Column="2" MinWidth="18" Template="{StaticResource HorizontalThumbTemplate}" Width="18"/>
                            <RepeatButton x:Name="HorizontalLargeIncrease" Grid.Column="3" IsTabStop="False" Interval="50" Template="{StaticResource RepeatButtonTemplate}"/>
                            <RepeatButton x:Name="HorizontalSmallIncrease" Grid.Column="4" IsTabStop="False" Interval="50" Margin="1" Template="{StaticResource HorizontalIncrementTemplate}" Width="16"/>
                        </Grid>
                        <Grid x:Name="VerticalRoot" Visibility="Collapsed">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Rectangle RadiusY="1" RadiusX="1" Grid.RowSpan="5" Stroke="#00000000" StrokeThickness="1" Fill="#FF3D3D3D"/>
                            <Rectangle Opacity=".375" RadiusY="1" RadiusX="1" Grid.RowSpan="5" StrokeThickness="1" Stroke="#FF3D3D3D"/>
                            <Rectangle Margin="1" RadiusY="1" RadiusX="1" Grid.RowSpan="5"/>
                            <RepeatButton x:Name="VerticalSmallDecrease" Height="16" IsTabStop="False" Interval="50" Margin="1" Grid.Row="0" Template="{StaticResource VerticalDecrementTemplate}"/>
                            <RepeatButton x:Name="VerticalLargeDecrease" Height="0" IsTabStop="False" Interval="50" Grid.Row="1" Template="{StaticResource RepeatButtonTemplate}"/>
                            <Thumb x:Name="VerticalThumb" Height="18" MinHeight="18" Grid.Row="2" Template="{StaticResource VerticalThumbTemplate}"/>
                            <RepeatButton x:Name="VerticalLargeIncrease" IsTabStop="False" Interval="50" Grid.Row="3" Template="{StaticResource RepeatButtonTemplate}"/>
                            <RepeatButton x:Name="VerticalSmallIncrease" Height="16" IsTabStop="False" Interval="50" Margin="1" Grid.Row="4" Template="{StaticResource VerticalIncrementTemplate}"/>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="HorizontalScrollBarStyle" TargetType="ScrollBar">
        <Setter Property="MinWidth" Value="17"/>
        <Setter Property="MinHeight" Value="17"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollBar">
                    <Grid x:Name="Root">
                        <Grid.Resources>
                            <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root" Background="Transparent">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="HorizontalIncrementTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundAnimation"/>
                                                    <ColorAnimation Duration="0" To="#7FFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#CCFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F2FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundAnimation"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight"/>
                                                    <ColorAnimation Duration="0" To="#6BFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#C6FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#EAFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F4FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To=".7" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledElement"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background" Fill="#FF1F3B53" Opacity="0" RadiusY="2" RadiusX="2" StrokeThickness="1" Visibility="Collapsed">
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
                                                <GradientStop Color="#FF647480" Offset="1"/>
                                                <GradientStop Color="#FFAEB7BF" Offset="0"/>
                                                <GradientStop Color="#FF919EA7" Offset="0.35"/>
                                                <GradientStop Color="#FF7A8A99" Offset="0.35"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Rectangle x:Name="BackgroundAnimation" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1" Visibility="Collapsed"/>
                                    <Rectangle x:Name="BackgroundGradient" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FFFFFFFF" StrokeThickness="1" Visibility="Collapsed">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                <GradientStop Color="#E5FFFFFF" Offset="0.603"/>
                                                <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Rectangle x:Name="Highlight" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FF6DBDD1" StrokeThickness="1" Visibility="Collapsed"/>
                                    <Path Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z " Height="8" Stretch="Uniform" Width="4">
                                        <Path.Fill>
                                            <SolidColorBrush x:Name="ButtonColor" Color="Gray"/>
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement" Fill="#FFFFFFFF" Opacity="0" RadiusY="2" RadiusX="2"/>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="HorizontalDecrementTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundMouseOver"/>
                                                    <ColorAnimation Duration="0" To="#7FFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#CCFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F2FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundPressed"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight"/>
                                                    <ColorAnimation Duration="0" To="#6BFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#C6FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#EAFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F4FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To=".7" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledElement"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background" Fill="#FF1F3B53" Opacity="0" RadiusY="2" RadiusX="2" StrokeThickness="1" Visibility="Collapsed">
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
                                                <GradientStop Color="#FF647480" Offset="1"/>
                                                <GradientStop Color="#FFAEB7BF" Offset="0"/>
                                                <GradientStop Color="#FF919EA7" Offset="0.35"/>
                                                <GradientStop Color="#FF7A8A99" Offset="0.35"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Rectangle x:Name="BackgroundMouseOver" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1" Visibility="Collapsed"/>
                                    <Rectangle x:Name="BackgroundPressed" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1" Visibility="Collapsed"/>
                                    <Rectangle x:Name="BackgroundGradient" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FFFFFFFF" StrokeThickness="1" Visibility="Collapsed">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                <GradientStop Color="#E5FFFFFF" Offset="0.603"/>
                                                <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Rectangle x:Name="Highlight" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FF6DBDD1" StrokeThickness="1" Visibility="Collapsed"/>
                                    <Path Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z " Height="8" Stretch="Uniform" Width="4">
                                        <Path.Fill>
                                            <SolidColorBrush x:Name="ButtonColor" Color="Gray"/>
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement" Fill="#FFFFFFFF" Opacity="0" RadiusY="2" RadiusX="2"/>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalIncrementTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundMouseOver"/>
                                                    <ColorAnimation Duration="0" To="#7FFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#CCFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F2FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundPressed"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight"/>
                                                    <ColorAnimation Duration="0" To="#6BFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#C6FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#EAFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F4FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To=".7" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledElement"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background" Fill="#FF1F3B53" Opacity="0" RadiusY="2" RadiusX="2" StrokeThickness="1">
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush EndPoint="1,.5" StartPoint="0,.5">
                                                <GradientStop Color="#FF647480" Offset="1"/>
                                                <GradientStop Color="#FFAEB7BF" Offset="0"/>
                                                <GradientStop Color="#FF919EA7" Offset="0.35"/>
                                                <GradientStop Color="#FF7A8A99" Offset="0.35"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Rectangle x:Name="BackgroundMouseOver" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1"/>
                                    <Rectangle x:Name="BackgroundPressed" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1"/>
                                    <Rectangle x:Name="BackgroundGradient" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FFFFFFFF" StrokeThickness="1">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint="1,.7" StartPoint="0,.7">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                <GradientStop Color="#E5FFFFFF" Offset="0.603"/>
                                                <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Rectangle x:Name="Highlight" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FF6DBDD1" StrokeThickness="1"/>
                                    <Path Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z " Height="4" Stretch="Uniform" Width="8">
                                        <Path.Fill>
                                            <SolidColorBrush x:Name="ButtonColor" Color="#FF333333"/>
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement" Fill="#FFFFFFFF" Opacity="0" RadiusY="2" RadiusX="2"/>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalDecrementTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundMouseOver"/>
                                                    <ColorAnimation Duration="0" To="#7FFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#CCFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F2FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundGradient"/>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundPressed"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight"/>
                                                    <ColorAnimation Duration="0" To="#6BFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#C6FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#EAFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F4FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To=".7" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledElement"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background" Fill="#FF1F3B53" Opacity="0" RadiusY="2" RadiusX="2" StrokeThickness="1">
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush EndPoint="1,.5" StartPoint="0,.5">
                                                <GradientStop Color="#FF647480" Offset="1"/>
                                                <GradientStop Color="#FFAEB7BF" Offset="0"/>
                                                <GradientStop Color="#FF919EA7" Offset="0.35"/>
                                                <GradientStop Color="#FF7A8A99" Offset="0.35"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Rectangle x:Name="BackgroundMouseOver" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1"/>
                                    <Rectangle x:Name="BackgroundPressed" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1"/>
                                    <Rectangle x:Name="BackgroundGradient" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FFFFFFFF" StrokeThickness="1">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint="1,.7" StartPoint="0,.7">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                <GradientStop Color="#E5FFFFFF" Offset="0.603"/>
                                                <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Rectangle x:Name="Highlight" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FF6DBDD1" StrokeThickness="1"/>
                                    <Path Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z " Height="4" Stretch="Uniform" Width="8">
                                        <Path.Fill>
                                            <SolidColorBrush x:Name="ButtonColor" Color="#FF333333"/>
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement" Fill="#FFFFFFFF" Opacity="0" RadiusY="2" RadiusX="2"/>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalThumbTemplate" TargetType="Thumb">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundMouseOver"/>
                                                    <ColorAnimation Duration="0" To="#7FFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#CCFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F2FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundPressed"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight"/>
                                                    <ColorAnimation Duration="0" To="#6BFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#C6FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#EAFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                    <ColorAnimation Duration="0" To="#F4FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ThumbVisual"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid x:Name="ThumbVisual" Margin="1,0,1,0">
                                        <Rectangle x:Name="Background" Fill="#FF1F3B53" RadiusY="2" RadiusX="2" StrokeThickness="1">
                                            <Rectangle.Stroke>
                                                <LinearGradientBrush EndPoint="1,.5" StartPoint="0,.5">
                                                    <GradientStop Color="#FF818F99" Offset="1"/>
                                                    <GradientStop Color="#FFC2C9CE" Offset="0"/>
                                                    <GradientStop Color="#FFB3BBC1" Offset="0.35"/>
                                                    <GradientStop Color="#FF96A4B1" Offset="0.35"/>
                                                </LinearGradientBrush>
                                            </Rectangle.Stroke>
                                        </Rectangle>
                                        <Rectangle x:Name="BackgroundMouseOver" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1"/>
                                        <Rectangle x:Name="BackgroundPressed" Fill="#FF448DCA" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#00000000" StrokeThickness="1"/>
                                        <Rectangle x:Name="BackgroundGradient" Margin="1" RadiusY="1" RadiusX="1" Stroke="#FFFFFFFF" StrokeThickness="1">
                                            <Rectangle.Fill>
                                                <LinearGradientBrush EndPoint="1,.7" StartPoint="0,.7">
                                                    <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                                    <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                    <GradientStop Color="#E5FFFFFF" Offset="0.6"/>
                                                    <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Rectangle.Fill>
                                        </Rectangle>
                                        <Rectangle x:Name="Highlight" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FF6DBDD1" StrokeThickness="1"/>
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="HorizontalThumbTemplate" TargetType="Thumb">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundMouseOver"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundPressed"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0:0:0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ThumbVisual"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid x:Name="ThumbVisual" Margin="0,1,0,1">
                                        <Rectangle x:Name="Background" Fill="#FF1F3B53" RadiusY="7" RadiusX="7" StrokeThickness="1" Stroke="#FF3D3D3D"/>
                                        <Rectangle x:Name="BackgroundMouseOver" Fill="#FF448DCA" Opacity="0" RadiusY="7" RadiusX="7" Stroke="#00000000" StrokeThickness="1" Visibility="Collapsed"/>
                                        <Rectangle x:Name="BackgroundPressed" Fill="#FF448DCA" Opacity="0" RadiusY="7" RadiusX="7" Stroke="#00000000" StrokeThickness="1" Visibility="Collapsed"/>
                                        <Rectangle x:Name="BackgroundGradient" Margin="1" RadiusY="6" RadiusX="6" Stroke="#FF3D3D3D" StrokeThickness="1" Fill="Gray"/>
                                        <Rectangle x:Name="Highlight" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" StrokeThickness="1"/>
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="HorizontalRoot">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Rectangle Grid.ColumnSpan="5" RadiusY="1" RadiusX="1" Stroke="#00000000" StrokeThickness="1" Fill="#FF3D3D3D"/>
                            <Rectangle Grid.ColumnSpan="5" Fill="{TemplateBinding Background}" RadiusY="1" RadiusX="1" Stroke="#FF3D3D3D" StrokeThickness="1"/>
                            <Rectangle Grid.ColumnSpan="5" Opacity=".375" RadiusY="1" RadiusX="1" StrokeThickness="1" Stroke="#FF3D3D3D"/>
                            <Rectangle Grid.ColumnSpan="5" Margin="1" RadiusY="1" RadiusX="1" Stroke="#FF3D3D3D"/>
                            <RepeatButton x:Name="HorizontalSmallDecrease" Grid.Column="0" IsTabStop="False" Interval="50" Margin="1" Template="{StaticResource HorizontalDecrementTemplate}" Width="16"/>
                            <RepeatButton x:Name="HorizontalLargeDecrease" Grid.Column="1" IsTabStop="False" Interval="50" Template="{StaticResource RepeatButtonTemplate}" Width="0"/>
                            <Thumb x:Name="HorizontalThumb" Background="{TemplateBinding Background}" Grid.Column="2" MinWidth="18" Template="{StaticResource HorizontalThumbTemplate}" Width="18"/>
                            <RepeatButton x:Name="HorizontalLargeIncrease" Grid.Column="3" IsTabStop="False" Interval="50" Template="{StaticResource RepeatButtonTemplate}"/>
                            <RepeatButton x:Name="HorizontalSmallIncrease" Grid.Column="4" IsTabStop="False" Interval="50" Margin="1" Template="{StaticResource HorizontalIncrementTemplate}" Width="16"/>
                        </Grid>
                        <Grid x:Name="VerticalRoot" Visibility="Collapsed">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Rectangle RadiusY="1" RadiusX="1" Grid.RowSpan="5" Stroke="#00000000" StrokeThickness="1">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0,0.5" StartPoint="1,0.5">
                                        <GradientStop Color="#FFF4F6F7" Offset="0"/>
                                        <GradientStop Color="#FFF0F4F7" Offset="0.344"/>
                                        <GradientStop Color="#FFDFE3E6" Offset="1"/>
                                        <GradientStop Color="#FFE9EEF4" Offset="0.527"/>
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Rectangle Opacity=".375" RadiusY="1" RadiusX="1" Grid.RowSpan="5" StrokeThickness="1">
                                <Rectangle.Stroke>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                                        <GradientStop Color="#FF718597" Offset="0.375"/>
                                        <GradientStop Color="#FF617584" Offset="1"/>
                                    </LinearGradientBrush>
                                </Rectangle.Stroke>
                            </Rectangle>
                            <Rectangle Margin="1" RadiusY="1" RadiusX="1" Grid.RowSpan="5">
                                <Rectangle.Stroke>
                                    <LinearGradientBrush EndPoint="0.125,0.5" StartPoint="0.875,0.5">
                                        <GradientStop Color="#33FFFFFF"/>
                                        <GradientStop Color="#99FFFFFF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Rectangle.Stroke>
                            </Rectangle>
                            <RepeatButton x:Name="VerticalSmallDecrease" Height="16" IsTabStop="False" Interval="50" Margin="1" Grid.Row="0" Template="{StaticResource VerticalDecrementTemplate}"/>
                            <RepeatButton x:Name="VerticalLargeDecrease" Height="0" IsTabStop="False" Interval="50" Grid.Row="1" Template="{StaticResource RepeatButtonTemplate}"/>
                            <Thumb x:Name="VerticalThumb" Height="18" MinHeight="18" Grid.Row="2" Template="{StaticResource VerticalThumbTemplate}"/>
                            <RepeatButton x:Name="VerticalLargeIncrease" IsTabStop="False" Interval="50" Grid.Row="3" Template="{StaticResource RepeatButtonTemplate}"/>
                            <RepeatButton x:Name="VerticalSmallIncrease" Height="16" IsTabStop="False" Interval="50" Margin="1" Grid.Row="4" Template="{StaticResource VerticalIncrementTemplate}"/>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="RadScheduleViewControlTemplate" TargetType="local:RadScheduleView">
        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">

            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OrienatationStates">
                    <VisualState x:Name="Horizontal">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeadersHeight" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Vertical">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeadersWidth" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ItemsHost" Storyboard.TargetProperty="(Grid.Column)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>1</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ItemsHost" Storyboard.TargetProperty="(Grid.ColumnSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>1</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ItemsHost" Storyboard.TargetProperty="(Grid.Row)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>0</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ItemsHost" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>2</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TimeRulerPanel" Storyboard.TargetProperty="(Grid.Column)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>0</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TimeRulerPanel" Storyboard.TargetProperty="(Grid.Row)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>1</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TimeRulerPanel" Storyboard.TargetProperty="Offset">
								<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{Binding VerticalOffset, RelativeSource={RelativeSource TemplatedParent}}" />
							</ObjectAnimationUsingKeyFrames>-->

                            <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_TimeRulerPanel" Storyboard.TargetProperty="Offset">
								<DiscreteObjectKeyFrame KeyTime="0:0:0">
									<DiscreteObjectKeyFrame.Value>
										<Binding Path="VerticalOffset" RelativeSource="{RelativeSource TemplatedParent}" />
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>								
							</ObjectAnimationUsingKeyFrames>-->

                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>

            <Grid>


                <telerik:CommandManager.InputBindings>
                    <telerik:InputBindingCollection>
                        <telerik:KeyBinding Key="Delete" Command="local:RadScheduleViewCommands.DeleteAppointment" />
                    </telerik:InputBindingCollection>
                </telerik:CommandManager.InputBindings>


                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>

                <Border x:Name="NavigationHeader" Visibility="{TemplateBinding NavigationHeaderVisibility}" BorderBrush="{StaticResource SchedulerHeaderOuterBorder}" Background="{StaticResource SchedulerHeaderBackground}" BorderThickness="1">
                    <Border BorderBrush="{StaticResource SchedulerHeaderInnerBorder}" BorderThickness="1">
                        <Grid x:Name="ScheduleViewHeader">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <ListBox x:Name="ViewModeSelection" Grid.Column="0" Style="{StaticResource ViewModeSelectionListBoxStyle}" SelectionMode="Single" ItemsSource="{TemplateBinding ViewDefinitions}"
									SelectedIndex="{Binding ActiveViewDefinitionIndex, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                            <StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
                                <ContentControl x:Name="CurrentInterval" VerticalAlignment="Center" HorizontalAlignment="Right" Style="{StaticResource NavigationIntervalStyle}" Content="{TemplateBinding CurrentVisibleRangeText}" />
                                <telerik:RadButton Style="{StaticResource NavigationButtonBackStyle}" Command="local:RadScheduleViewCommands.DecreaseVisibleDateLarge" />
                                <telerik:RadDatePicker x:Name="PART_NavigationPicker" Style="{StaticResource NavigationDateTimePickerStyle}" SelectedValue="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CurrentDate, Mode=TwoWay}" />
                                <telerik:RadButton Style="{StaticResource NavigationButtonNextStyle}" Command="local:RadScheduleViewCommands.IncreaseVisibleDateLarge" />
                            </StackPanel>
                        </Grid>
                    </Border>
                </Border>

                <telerik:RadTransitionControl x:Name="PART_TranstionControl" Grid.Row="1" Duration="00:00:00.500">

                    <telerik:RadTransitionControl.Transition>
                        <telerik:SlideAndZoomTransition MinZoom="1" />
                    </telerik:RadTransitionControl.Transition>

                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <Border x:Name="HeadersHeight" Grid.ColumnSpan="3" Height="{TemplateBinding HeadersLength}"/>
                        <Border x:Name="HeadersWidth" Grid.RowSpan="3" Width="{TemplateBinding HeadersLength}" />

                        <!-- TODO: Silverlight - workaround ClipToBounds -->
                        <local:TimeRulerPanel x:Name="PART_TimeRulerPanel" Grid.Row="0" Grid.Column="1"  Orientation="{TemplateBinding EffectiveOrientation}" Offset="{Binding HorizontalOffset, RelativeSource={RelativeSource TemplatedParent}}" >

                        </local:TimeRulerPanel>
                        <local:AppointmentsPanel x:Name="PART_ItemsHost" 
							 Canvas.ZIndex="1"
							 Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Background="{x:Null}" Orientation="{TemplateBinding EffectiveOrientation}">

                        </local:AppointmentsPanel>

                        <telerikPrimitives:LayoutTransformControl
									Grid.Row="1" Grid.Column="1"
									VerticalAlignment="Center" HorizontalAlignment="Right" 
									Visibility="{TemplateBinding ComputedAppointmentNavigationButtonsVisibility}"
									Canvas.ZIndex="1"
									
							UseLayoutRounding="True"
							
							 >
                            <telerikPrimitives:LayoutTransformControl.LayoutTransform>
                                <RotateTransform Angle="-90" />
                            </telerikPrimitives:LayoutTransformControl.LayoutTransform>
                            <telerik:RadButton CornerRadius="2 2 0 0" HorizontalContentAlignment="Stretch" Command="local:RadScheduleViewCommands.GoToNextAppointment" telerik:StyleManager.Theme="{StaticResource Theme}"  >
                                <Grid Width="160">
                                    <TextBlock telerik:LocalizationManager.ResourceKey="NextAppointment" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                    <TextBlock Text="â–¼" FontSize="8" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="8 0" />
                                </Grid>
                            </telerik:RadButton>
                        </telerikPrimitives:LayoutTransformControl>

                        <telerikPrimitives:LayoutTransformControl
									Grid.Row="1" Grid.Column="1"
									VerticalAlignment="Center" HorizontalAlignment="Left"
									Visibility="{TemplateBinding ComputedAppointmentNavigationButtonsVisibility}"
									Canvas.ZIndex="1"
									
							UseLayoutRounding="True"
							
							 >
                            <telerikPrimitives:LayoutTransformControl.LayoutTransform>
                                <RotateTransform Angle="-90" />
                            </telerikPrimitives:LayoutTransformControl.LayoutTransform>

                            <telerik:RadButton CornerRadius="0 0 2 2" Command="local:RadScheduleViewCommands.GoToPreviousAppointment" telerik:StyleManager.Theme="{StaticResource Theme}"  >
                                <Grid Width="160">
                                    <TextBlock telerik:LocalizationManager.ResourceKey="PreviousAppointment" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                    <TextBlock Text="â–²" FontSize="8" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="8 0" />
                                </Grid>
                            </telerik:RadButton>

                        </telerikPrimitives:LayoutTransformControl>

                        <!-- TODO: Silverlight - workaround ClipToBounds -->
                        <local:TimeRulerLinesPanel x:Name="PART_TimeRulerLinesPanel" Grid.Row="1" Grid.Column="1" Background="Transparent" Orientation="{TemplateBinding EffectiveOrientation}" PixelLength="{TemplateBinding EffectivePixelLength}">


                            <telerik:CommandManager.InputBindings>
                                <telerik:InputBindingCollection>
                                    <!-- TODO: Silverlight - fail -->
                                    <telerik:MouseBinding MouseAction="LeftDoubleClick" Command="local:RadScheduleViewCommands.CreateAppointment" />
                                </telerik:InputBindingCollection>
                            </telerik:CommandManager.InputBindings>

                        </local:TimeRulerLinesPanel>

                        <!-- TODO: Silverlight - workaround ClipToBounds -->
                        <local:HighlightPanel 
							x:Name="PART_HighlightPanel" 
							Grid.Row="1" 
							Grid.Column="1" 
							HorizontalAlignment="Left" 
							VerticalAlignment="Stretch" 
							Background="Transparent" 
							Orientation="{TemplateBinding EffectiveOrientation}" 
							PixelLength="{TemplateBinding EffectivePixelLength}"
							IsHitTestVisible="False"
							
							
							Canvas.ZIndex="1"
							 >
                        </local:HighlightPanel>

                        <Border x:Name="AppointmentsBorder" Grid.Row="1" Grid.Column="1" BorderBrush="{StaticResource GroupHeaderBorderBrush}" BorderThickness="1" />

                        <Border x:Name="VerticalHeadersBorder" Grid.Row="1" Grid.Column="0" BorderBrush="{StaticResource GroupHeaderHeaderOuterBorder_Vertical}" BorderThickness="0 1" 
							 Canvas.ZIndex="3"
							 />
                        <!--<Border x:Name="HorizontalHeadersBorder" Grid.Row="0" Grid.Column="1" BorderBrush="{StaticResource GroupHeaderHeaderOuterBorder}" BorderThickness="1 0" 
								 Canvas.ZIndex="3"/>-->
								 

                        <ScrollBar x:Name="PART_HorizontalScrollBar"
								Grid.Row="2" Grid.Column="1"
								Orientation="Horizontal"
								ViewportSize="{TemplateBinding ViewportWidth}"
								Maximum="{TemplateBinding ExtentWidth}"
								Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
								SmallChange="{TemplateBinding HorizontalSmallChange}"
								LargeChange="{TemplateBinding HorizontalLargeChange}"
								telerik:StyleManager.Theme="{StaticResource Theme}" Style="{StaticResource HorizontalScrollBarStyle}" />

                        <ScrollBar x:Name="PART_VerticalScrollBar"
								Grid.Row="1" Grid.Column="2"
								Orientation="Vertical"
								ViewportSize="{TemplateBinding ViewportHeight}"
								Maximum="{TemplateBinding ExtentHeight}"
								Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
								SmallChange="{TemplateBinding VerticalSmallChange}"
								LargeChange="{TemplateBinding VerticalLargeChange}"
								telerik:StyleManager.Theme="{StaticResource Theme}" Style="{StaticResource VerticalScrollBarStyle}"/>

                        <Grid x:Name="WarningsPanel" Grid.Row="0" Grid.RowSpan="3" Grid.ColumnSpan="3" 
									 Canvas.ZIndex="2"
									 >
                            <Grid x:Name="ViewDefinitionWarning" Background="Black" Visibility="{Binding ActiveViewDefinition, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedNullToVisibilityConverter}}">
                                <TextBlock Text="Please select a View definition" FontSize="32" HorizontalAlignment="Center" VerticalAlignment="Center" />
                            </Grid>
                            <Grid x:Name="AppointmentSourceWarning" Background="Black" Visibility="{Binding AppointmentsSource, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedNullToVisibilityConverter}}">
                                <TextBlock Text="Please provide an AppointmentsSource" FontSize="32" Foreground="Black" HorizontalAlignment="Center" VerticalAlignment="Center" />
                            </Grid>
                        </Grid>
                    </Grid>
                </telerik:RadTransitionControl>
            </Grid>
        </Border>

    </ControlTemplate>

    <Style x:Key="CurrentTimeIndicatorStyle"  TargetType="local:CurrentTimeIndicator">
        <Setter Property="Canvas.ZIndex" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Margin="0 0 -1 -1" MinWidth="2" MinHeight="2" Fill="{StaticResource CurrentTimeFill}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <local:CategoryCollection x:Key="DefaultCategoryCollection">
        <local:Category CategoryName="Red Category" CategoryBrush="{StaticResource RedCategoryBrush}" />
        <local:Category CategoryName="Green Category" CategoryBrush="{StaticResource GreenCategoryBrush}" />
        <local:Category CategoryName="Blue Category" CategoryBrush="{StaticResource BlueCategoryBrush}" />
        <local:Category CategoryName="Purple Category" CategoryBrush="{StaticResource PurpleCategoryBrush}" />
        <local:Category CategoryName="Yellow Category" CategoryBrush="{StaticResource YellowCategoryBrush}" />
        <local:Category CategoryName="Olive Category" CategoryBrush="{StaticResource OliveCategoryBrush}" />
        <local:Category CategoryName="Pink Category" CategoryBrush="{StaticResource PinkCategoryBrush}" />
        <local:Category CategoryName="Orange Category" CategoryBrush="{StaticResource OrangeCategoryBrush}" />
    </local:CategoryCollection>
    <local:TimeMarkerCollection x:Key="DefaultTimeMarkerCollection">
        <local:TimeMarker TimeMarkerName="Free" TimeMarkerBrush="{StaticResource FreeMarkerBrush}" />
        <local:TimeMarker TimeMarkerName="Tentative" TimeMarkerBrush="{StaticResource TentativeMarkerBrush}" />
        <local:TimeMarker TimeMarkerName="Busy" TimeMarkerBrush="{StaticResource BusyMarkerBrush}" />
        <local:TimeMarker TimeMarkerName="OutOfOffice" TimeMarkerBrush="{StaticResource OutOfOfficeMarkerBrush}" />
    </local:TimeMarkerCollection>

    <Style x:Key="ScheduleViewBaseStyle" TargetType="local:ScheduleViewBase">

        <Setter Property="Foreground" Value="{StaticResource RadScheduleForeground}" />
        <Setter Property="Background" Value="{StaticResource RadScheduleBackground}" />
        <Setter Property="BorderBrush" Value="{StaticResource RadScheduleBorderBrush}" />
        <Setter Property="BorderThickness" Value="0" />

        <!-- GroupHeaders -->
        <Setter Property="GroupHeaderStyleSelector" Value="{StaticResource GroupHeaderStyleSelector}" />
        <Setter Property="GroupHeaderContentTemplateSelector" Value="{StaticResource GroupHeaderContentTemplateSelector}" />

        <!-- TimeRuler -->
        <Setter Property="TimeRulerItemStyleSelector" Value="{StaticResource TimeRulerItemStyleSelector}" />
        <Setter Property="TimeRulerItemTemplateSelector" Value="{StaticResource TimeRulerItemTemplateSelector}" />
        <Setter Property="CurrentTimeIndicatorStyle" Value="{StaticResource CurrentTimeIndicatorStyle}" />

        <!-- TimeSlot decorations -->
        <Setter Property="ResizeHighlightStyle" Value="{StaticResource ResizeHighlightStyle}" />
        <Setter Property="DragDropHighlightStyle" Value="{StaticResource DragDropHighlightStyle}" />
        <Setter Property="MouseOverHighlightStyle" Value="{StaticResource MouseOverHighlightStyle}" />
        <Setter Property="SelectionHighlightStyle" Value="{StaticResource SelectionHighlightStyle}" />
        <Setter Property="SpecialSlotStyleSelector" Value="{StaticResource SpecialSlotStyleSelector}" />

        <!-- AppointmentItem and decorations -->
        <Setter Property="MinAppointmentWidth" Value="50" />
        <Setter Property="AppointmentStyleSelector" Value="{StaticResource AppointmentItemStyleSelector}" />
        <Setter Property="InlineEditingTemplate" Value="{StaticResource InlineEditTemplate}" />
        <Setter Property="ToolTipTemplate" Value="{StaticResource ToolTipTemplate}" />

        <!-- Drag Visual -->
        <Setter Property="DragVisualStyle" Value="{StaticResource DragVisualStyle}"/>
        <Setter Property="DragVisualTemplate" Value="{StaticResource DragVisualContentTemplate}" />

        <!-- Categories&Markers -->
        <Setter Property="CategoriesSource" Value="{StaticResource DefaultCategoryCollection}" />
        <Setter Property="TimeMarkersSource" Value="{StaticResource DefaultTimeMarkerCollection}" />

        <!-- Dialog styles -->
        <Setter Property="EditAppointmentDialogStyle" Value="{StaticResource EditAppointmentDialogStyle}" />
        <Setter Property="EditRecurrenceDialogStyle" Value="{StaticResource EditRecurrenceDialogStyle}" />
        <Setter Property="DeleteAppointmentConfirmDialogStyle" Value="{StaticResource DeleteAppointmentConfirmDialogStyle}" />
        <Setter Property="RecurrenceChoiceDialogStyle" Value="{StaticResource RecurrenceChoiceDialogStyle}" />
        <Setter Property="RecurrenceChoiceDeleteDialogStyle" Value="{StaticResource RecurrenceChoiceDeleteDialogStyle}" />
        <Setter Property="RecurrenceChoiceResizeDialogStyle" Value="{StaticResource RecurrenceChoiceResizeDialogStyle}" />
        <Setter Property="RecurrenceChoiceDragDropDialogStyle" Value="{StaticResource RecurrenceChoiceDragDropDialogStyle}" />


    </Style>

    <Style x:Key="RadScheduleViewStyle" TargetType="local:RadScheduleView">

        <Setter Property="telerik:ScrollingSettingsBehavior.IsEnabled" Value="True" />
        <Setter Property="telerik:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30" />
        <Setter Property="telerik:ScrollingSettingsBehavior.ScrollStep" Value="5" />
        <Setter Property="telerik:ScrollingSettingsBehavior.ScrollStepTime" Value="00:00:00.01" />
        <Setter Property="Foreground" Value="{StaticResource RadScheduleForeground}" />
        <Setter Property="Background" Value="{StaticResource RadScheduleBackground}" />
        <Setter Property="BorderBrush" Value="{StaticResource RadScheduleBorderBrush}" />
        <Setter Property="BorderThickness" Value="0" />

        <Setter Property="Template" Value="{StaticResource RadScheduleViewControlTemplate}" />

        <!-- GroupHeaders -->
        <Setter Property="GroupHeaderStyleSelector" Value="{StaticResource GroupHeaderStyleSelector}" />
        <Setter Property="GroupHeaderContentTemplateSelector" Value="{StaticResource GroupHeaderContentTemplateSelector}" />

        <!-- TimeRuler -->
        <Setter Property="TimeRulerItemStyleSelector" Value="{StaticResource TimeRulerItemStyleSelector}" />
        <Setter Property="TimeRulerItemTemplateSelector" Value="{StaticResource TimeRulerItemTemplateSelector}" />
        <Setter Property="CurrentTimeIndicatorStyle" Value="{StaticResource CurrentTimeIndicatorStyle}" />

        <!-- TimeSlot decorations -->
        <Setter Property="ResizeHighlightStyle" Value="{StaticResource ResizeHighlightStyle}" />
        <Setter Property="DragDropHighlightStyle" Value="{StaticResource DragDropHighlightStyle}" />
        <Setter Property="MouseOverHighlightStyle" Value="{StaticResource MouseOverHighlightStyle}" />
        <Setter Property="SelectionHighlightStyle" Value="{StaticResource SelectionHighlightStyle}" />
        <Setter Property="SpecialSlotStyleSelector" Value="{StaticResource SpecialSlotStyleSelector}" />

        <!-- AppointmentItem and decorations -->
        <Setter Property="MinAppointmentWidth" Value="50" />
        <Setter Property="AppointmentStyleSelector" Value="{StaticResource AppointmentItemStyleSelector}" />
        <Setter Property="InlineEditingTemplate" Value="{StaticResource InlineEditTemplate}" />
        <Setter Property="ToolTipTemplate" Value="{StaticResource ToolTipTemplate}" />

        <!-- Drag Visual -->
        <Setter Property="DragVisualStyle" Value="{StaticResource DragVisualStyle}"/>
        <Setter Property="DragVisualTemplate" Value="{StaticResource DragVisualContentTemplate}" />

        <!-- Categories&Markers -->
        <Setter Property="CategoriesSource" Value="{StaticResource DefaultCategoryCollection}" />
        <Setter Property="TimeMarkersSource" Value="{StaticResource DefaultTimeMarkerCollection}" />

        <!-- Dialog styles -->
        <Setter Property="EditAppointmentDialogStyle" Value="{StaticResource EditAppointmentDialogStyle}" />
        <Setter Property="EditRecurrenceDialogStyle" Value="{StaticResource EditRecurrenceDialogStyle}" />
        <Setter Property="DeleteAppointmentConfirmDialogStyle" Value="{StaticResource DeleteAppointmentConfirmDialogStyle}" />
        <Setter Property="RecurrenceChoiceDialogStyle" Value="{StaticResource RecurrenceChoiceDialogStyle}" />
        <Setter Property="RecurrenceChoiceDeleteDialogStyle" Value="{StaticResource RecurrenceChoiceDeleteDialogStyle}" />
        <Setter Property="RecurrenceChoiceResizeDialogStyle" Value="{StaticResource RecurrenceChoiceResizeDialogStyle}" />
        <Setter Property="RecurrenceChoiceDragDropDialogStyle" Value="{StaticResource RecurrenceChoiceDragDropDialogStyle}" />


    </Style>

    <!-- Theme style setter -->
    <Style TargetType="local:RadScheduleView" BasedOn="{StaticResource RadScheduleViewStyle}" />
    <Style TargetType="local:AppointmentItem" BasedOn="{StaticResource AppointmentItemBaseStyle}" />
    <Style TargetType="local:GroupHeaderButton" BasedOn="{StaticResource GroupHeaderButtonStyle}" />
    <Style TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}" />
    <Style TargetType="local:TimeRulerItem" BasedOn="{StaticResource MinorVerticalTimeRulerItemStyle}" />
    <Style TargetType="local:TimeRulerLine" BasedOn="{StaticResource TimeRulerLineStyle}" />
    <Style TargetType="local:TimeRulerGroupItem" BasedOn="{StaticResource TimeRulerGroupItemStyle}" />
    <Style TargetType="local:TimeRulerMonthViewItem" BasedOn="{StaticResource TimeRulerMonthViewItemStyle}" />
    <Style TargetType="local:TimeRulerMonthViewGroupItem" BasedOn="{StaticResource TimeRulerMonthViewGroupItemStyle}" />
    <Style TargetType="local:HighlightItem" BasedOn="{StaticResource HighlightItemStyle}"/>





    <!-- RadWindow-->


    <DataTemplate x:Key="AlertIconTemplate">
        <Grid Height="44" Width="46">
            <Path Stretch="Fill" Margin="-22.792,0,0,0.274" RenderTransformOrigin="0.749972820281982,0.500000059604645"
					Data="M24.177877,0.032801032 C24.973236,0.35406893 25.418495,1.4006116 25.418495,1.4006121 C25.418495,1.4006116 46.196983,38.359432 46.196983,40.912521 C46.196983,43.465626 43.744934,43.759003 43.744934,43.759003 L23.09598,43.759003 L2.4520493,43.758999 C2.4520493,43.758999 0,43.465626 0,40.912521 C0,38.359428 20.841993,1.4006089 20.841993,1.4006094 C20.841993,1.4006089 21.290586,0.35406619 22.085945,0.032798279 z"
					HorizontalAlignment="Left" Width="46.197">
                <Path.Fill>
                    <LinearGradientBrush EndPoint="0.378,0.983" StartPoint="0.622,0.017">
                        <GradientStop Color="#FFFFDA45" Offset="0.325" />
                        <GradientStop Color="#FFFF9945" Offset="1" />
                    </LinearGradientBrush>
                </Path.Fill>
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="-1" />
                        <SkewTransform AngleX="0" AngleY="0" />
                        <RotateTransform Angle="0" />
                        <TranslateTransform X="-2.6427077841617574E-06" />
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>
            <Path Stretch="Fill" Margin="-22.792,17.862,0,0.274"
					RenderTransformOrigin="0.749972820281982,0.500000059604645"
					Data="M44.972065,37.721554 C45.75716,39.384399 46.196983,40.533127 46.196983,40.912521 C46.196983,43.465626 43.744934,43.759003 43.744934,43.759003 L23.09598,43.759003 L2.4520493,43.758999 C2.4520493,43.758999 0,43.465626 0,40.912521 C0,39.551815 5.8988295,28.605951 11.450073,18.315256 C11.575222,18.08326 44.685875,37.115395 44.972065,37.721554 z"
					HorizontalAlignment="Left" Width="46.197">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="-1" />
                        <SkewTransform AngleX="0" AngleY="0" />
                        <RotateTransform Angle="0" />
                        <TranslateTransform X="-2.6427077841617574E-06" />
                    </TransformGroup>
                </Path.RenderTransform>
                <Path.Fill>
                    <LinearGradientBrush EndPoint="0.378,0.983" StartPoint="0.524,0.404">
                        <GradientStop Color="#FFFCB827" Offset="0.675" />
                        <GradientStop Color="#FFFE9A0A" Offset="0.122" />
                    </LinearGradientBrush>
                </Path.Fill>
            </Path>
            <Path Stretch="Fill" Margin="-21.842,1.273,0,0.647"
					RenderTransformOrigin="0.749972820281982,0.500000059604645"
					Data="M24.177877,0.032801032 C24.973236,0.35406893 25.201269,1.4006116 25.201269,1.4006121 C25.201269,1.4006116 45.979759,38.359432 45.979759,40.912521 C45.979759,43.465626 43.52771,43.626354 43.52771,43.626354 L23.09598,43.626354 L2.8015947,43.62635 C2.8015947,43.62635 0.34954548,43.465626 0.34954548,40.912521 C0.34954548,38.359428 21.19154,1.4006089 21.19154,1.4006094 C21.19154,1.4006089 21.640133,0.35406619 22.435492,0.032798279 z"
					Stroke="#FFFEF065" HorizontalAlignment="Left" Width="44.514">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="-1" />
                        <SkewTransform AngleX="0" AngleY="0" />
                        <RotateTransform Angle="0" />
                        <TranslateTransform X="0.80997209357889233" />
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>
            <Path Stretch="Fill" Height="17.453" Margin="6,0,6,0.522" VerticalAlignment="Bottom"
					Data="M179.65936,132.98976 L209.18358,132.98976 C209.18358,132.98976 207.00056,119.53224 194.23856,119.53224 C182.50038,119.53224 179.65936,132.98976 179.65936,132.98976 z">
                <Path.OpacityMask>
                    <RadialGradientBrush GradientOrigin="0.502,0.9">
                        <GradientStop Color="#A8FFD100" Offset="0.404" />
                        <GradientStop Color="Transparent" Offset="0.914" />
                        <GradientStop Color="#A0DCA209" Offset="0.238" />
                    </RadialGradientBrush>
                </Path.OpacityMask>
                <Path.Fill>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#24FEF9BA" Offset="1" />
                        <GradientStop Color="#BBFBFC18" Offset="0.913" />
                        <GradientStop Color="#48FED72C" Offset="0.272" />
                    </LinearGradientBrush>
                </Path.Fill>
            </Path>
            <Path Stretch="Fill" Margin="-23,0,0,0.274" RenderTransformOrigin="0.749972820281982,0.500000059604645"
					Data="M24.177877,0.032801032 C24.973236,0.35406893 25.418495,1.4006116 25.418495,1.4006121 C25.418495,1.4006116 46.196983,38.359432 46.196983,40.912521 C46.196983,43.465626 43.744934,43.759003 43.744934,43.759003 L23.09598,43.759003 L2.4520493,43.758999 C2.4520493,43.758999 0,43.465626 0,40.912521 C0,38.359428 20.841993,1.4006089 20.841993,1.4006094 C20.841993,1.4006089 21.290586,0.35406619 22.085945,0.032798279 z"
					HorizontalAlignment="Left" Width="46.197">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="-1" />
                        <SkewTransform AngleX="0" AngleY="0" />
                        <RotateTransform Angle="0" />
                        <TranslateTransform X="-2.6427077841617574E-06" />
                    </TransformGroup>
                </Path.RenderTransform>
                <Path.Stroke>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFF66E04" Offset="0" />
                        <GradientStop Color="#FFC35602" Offset="1" />
                    </LinearGradientBrush>
                </Path.Stroke>
            </Path>
            <Path Stretch="Fill" Margin="19.923,13.002,0,14.998"
					Data="M118.27322,79.474892 C118.27322,79.474892 118.85989,78.476952 119.21207,78.418251 C119.56425,78.359558 121.20724,78.418251 121.20724,78.418251 C121.20724,78.418251 121.9702,79.122696 122.02888,79.298744 C122.08757,79.474792 122.08733,91.269852 122.08733,91.269852 L121.14874,92.795433 L119.1532,92.79541 L118.21424,91.269402 z"
					Fill="White" HorizontalAlignment="Left" Width="5" />
            <Ellipse Fill="White" Height="6" Margin="19,0,0,5" VerticalAlignment="Bottom" HorizontalAlignment="Left"
					Width="6" />
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="ConfirmIconTemplate">
        <Grid Height="44" Width="44">
            <Ellipse Width="44">
                <Ellipse.Fill>
                    <LinearGradientBrush EndPoint="0.718,0.95" StartPoint="0.282,0.05">
                        <GradientStop Color="#FF67A1F4" Offset="0.107" />
                        <GradientStop Color="#FF1660C0" Offset="0.691" />
                    </LinearGradientBrush>
                </Ellipse.Fill>
            </Ellipse>
            <Path Stretch="Fill" Margin="1.512,16.495,0.765,0.399"
					Data="M289.00311,92.619354 C289.00311,92.619354 299.31836,80.597733 329.41049,81.075485 C329.88766,81.083061 332.65619,107.10075 308.88998,107.10075 C296.08267,107.10075 289.00311,92.619354 289.00311,92.619354 z">
                <Path.Fill>
                    <LinearGradientBrush EndPoint="0.61,0.964" StartPoint="0.39,0.036">
                        <GradientStop Color="#FF1660C0" Offset="0" />
                        <GradientStop Color="#FF084EAB" Offset="1" />
                    </LinearGradientBrush>
                </Path.Fill>
            </Path>
            <Ellipse Stroke="#FF9AC2FA" Margin="1,1,0,0">
                <Ellipse.OpacityMask>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#7C1D99EC" Offset="0" />
                        <GradientStop Color="#7EAFDDFC" Offset="1" />
                        <GradientStop Color="#C45EB6F1" Offset="0.382" />
                    </LinearGradientBrush>
                </Ellipse.OpacityMask>
            </Ellipse>
            <Path Stretch="Fill" Margin="13.257,6.592,12.036,15.073"
					Data="M300.16647,72.508377 L300.20032,76.801308 C300.20032,76.801308 303.76443,74.208626 308.57635,75.053101 C312.64224,75.766647 312.37244,80.342621 311.28177,81.957657 C307.64908,87.336853 306.09219,88.091827 306.09219,89.696152 C306.09219,91.561272 306.08142,92.930161 306.08142,92.930161 L311.46021,92.930161 L311.46597,89.720444 C311.46597,89.720444 312.49261,89.006256 315.2182,85.837914 C316.81396,83.982925 318.0397,81.959572 318.45352,80.790619 C319.04788,79.111671 319.7117,74.514389 315.04593,72.119629 C313.44992,71.300461 311.46005,70.473305 307.15707,70.607811 C302.8541,70.742317 300.16647,72.508377 300.16647,72.508377 z"
					Fill="White" />
            <Rectangle Fill="White" Height="6" Margin="19,0,19,6" VerticalAlignment="Bottom" />
            <Ellipse Width="44">
                <Ellipse.Stroke>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FF2F6FC4" Offset="0" />
                        <GradientStop Color="#FF084FAB" Offset="1" />
                    </LinearGradientBrush>
                </Ellipse.Stroke>
            </Ellipse>
        </Grid>
    </DataTemplate>

    <!-- WindowButtonStyle -->
    <Style x:Key="WindowButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Padding" Value="{StaticResource WindowButtonPadding}" />
        <Setter Property="Margin" Value="{StaticResource WindowButtonMargin}" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Grid>
                        <telerikChromes:ButtonChrome telerik:StyleManager.Theme="{StaticResource Theme}"
								RenderNormal="False" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
								RenderMouseOver="{TemplateBinding IsMouseOver}"
								RenderPressed="{TemplateBinding IsPressed}" />
                        <ContentPresenter Margin="{TemplateBinding Padding}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- WindowResizeThumbStyle -->
    <Style x:Key="WindowResizeThumbStyle" TargetType="Thumb">
        <Setter Property="MinWidth" Value="5" />
        <Setter Property="MinHeight" Value="5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Rectangle Fill="Transparent" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- RadWindowTemplate -->
    <ControlTemplate x:Key="RadWindowTemplate" TargetType="telerikNavigation:RadWindow">
        <Grid x:Name="LayoutRoot">

            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="Disabled" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused" />
                    <VisualState x:Name="Unfocused" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="DragStates">
                    <VisualState x:Name="NotDragging" />
                    <VisualState x:Name="Dragging" />
                    <VisualState x:Name="Resizing" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="WindowStates">
                    <VisualState x:Name="NormalWindow" />
                    <VisualState x:Name="Maximized">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="WindowOuterBorder"
									Storyboard.TargetProperty="CornerRadius">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <CornerRadius>0</CornerRadius>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="WindowInnerBorder"
									Storyboard.TargetProperty="CornerRadius">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <CornerRadius>0</CornerRadius>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="WindowOuterBorder"
									Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="WindowInnerBorder"
									Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentInnerBorder"
									Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0 1 0 0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentOuterBorder"
									Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0 1 0 0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentOuterBorder"
									Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderButtons"
									Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="WindowOuterBorder"
									Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Shadow" Storyboard.TargetProperty="Visibility">
								<DiscreteObjectKeyFrame KeyTime="0">
									<DiscreteObjectKeyFrame.Value>
										<Visibility>Collapsed</Visibility>
									</DiscreteObjectKeyFrame.Value>
								</DiscreteObjectKeyFrame>
							</ObjectAnimationUsingKeyFrames>-->
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Minimized">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentOuterBorder"
									Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderButtons"
									Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot"
									Storyboard.TargetProperty="HorizontalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <HorizontalAlignment>Left</HorizontalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot"
									Storyboard.TargetProperty="VerticalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <VerticalAlignment>Top</VerticalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>

            <Border x:Name="Shadow" CornerRadius="10" BorderBrush="#11000000" BorderThickness="1">
                <Border CornerRadius="9" BorderBrush="#22000000" BorderThickness="1">
                    <Border CornerRadius="8" BorderBrush="#33000000" BorderThickness="1">
                        <Border CornerRadius="7" BorderBrush="#44000000" BorderThickness="0 0 1 1">
                            <Border CornerRadius="6" BorderBrush="#55000000" BorderThickness="0 0 1 1">
                                <!--<Border CornerRadius="5" BorderBrush="#66000000" BorderThickness="1">
									<Border CornerRadius="4" BorderBrush="#77000000" BorderThickness="1">
									</Border>
								</Border>-->
                            </Border>
                        </Border>
                    </Border>
                </Border>
            </Border>

            <Border x:Name="WindowOuterBorder" Margin="3 3 5 5" Grid.RowSpan="2"
					BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="5">
                <Border x:Name="WindowInnerBorder" BorderBrush="{StaticResource WindowInnerBorder}" BorderThickness="1"
						CornerRadius="4">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <Rectangle x:Name="HeaderBackgroundVisual" Grid.Row="0"
								Fill="{StaticResource WindowHeaderBackground}" />
                        <Rectangle x:Name="BackgroundVisual" Grid.Row="1" Fill="{TemplateBinding BorderBackground}" />

                        <Grid x:Name="Header">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>

                            <Thumb x:Name="titleThumb" Grid.ColumnSpan="2"
									Style="{StaticResource WindowResizeThumbStyle}" />

                            <Grid Grid.Column="0" Margin="2 0 0 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>

                                <ContentPresenter x:Name="IconContent" Grid.Column="0" HorizontalAlignment="Left"
										VerticalAlignment="Center" Margin="2" Content="{TemplateBinding Icon}"
										ContentTemplate="{TemplateBinding IconTemplate}" />

                                <ContentPresenter x:Name="HeaderContent" Grid.Column="1" HorizontalAlignment="Stretch"
										VerticalAlignment="Center" Content="{TemplateBinding Header}"
										ContentTemplate="{TemplateBinding HeaderTemplate}"
										 >
                                </ContentPresenter>
                            </Grid>

                            <Border x:Name="PART_HeaderButtonsBorder" Grid.Column="1">
                                <StackPanel x:Name="HeaderButtons" Grid.Column="1" Orientation="Horizontal"
										Margin="0 0 3 0">
                                    <telerik:RadButton x:Name="PART_MinimizeButton"
											
										
										Command="telerik:WindowCommands.Minimize"
											
											Style="{StaticResource WindowButtonStyle}"
											Visibility="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource BooleanToVisibilityConverter}}">
                                        <Path Fill="{StaticResource WindowButtonIconFill}"
												Stroke="{StaticResource WindowButtonIconStroke}" Width="14" Height="14"
												Data="M1.5,7.5 L12.5,7.5 12.5,11.5 1.5,11.5 Z" />
                                    </telerik:RadButton>
                                    <telerik:RadButton x:Name="PART_RestoreButton"
													   		   
										
										Command="telerik:WindowCommands.Restore"
										
											Style="{StaticResource WindowButtonStyle}"
											Visibility="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource BooleanToVisibilityConverter}}">
                                        <Path Fill="{StaticResource WindowButtonIconFill}"
												Stroke="{StaticResource WindowButtonIconStroke}" Width="14" Height="14"
												Data="M0.5,4.5 0.5,11.5 1.5,12.5 8.5,12.5 9.5,11.5 9.5,3.5 1.5,3.5 Z M3.5,6.5 L3.5,9.5 L6.5,9.5 6.5,6.5 Z M3.5,3.5 3.5,1.5 4.5,0.5 11.5,0.5 12.5,1.5 12.5,9.5 11.5,10.5 9.5,10.5 9.5,3.5 Z" />
                                    </telerik:RadButton>
                                    <telerik:RadButton x:Name="PART_MaximizeButton" 
													   
										
										Command="telerik:WindowCommands.Maximize"
										
										Style="{StaticResource WindowButtonStyle}"
													   Visibility="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource BooleanToVisibilityConverter}}">
                                        <Path Fill="{StaticResource WindowButtonIconFill}"
												Stroke="{StaticResource WindowButtonIconStroke}" Width="14" Height="14"
												Data="M1.5,2.5 L12.5,2.5 12.5,11.5 1.5,11.5 Z M4.5,5.5 L9.5,5.5 9.5,8.5 4.5,8.5 Z" />
                                    </telerik:RadButton>
                                    <telerik:RadButton x:Name="PART_CloseButton" 
													   
										
										Command="telerik:WindowCommands.Close"
										
											Style="{StaticResource WindowButtonStyle}"
											Visibility="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource BooleanToVisibilityConverter}}">
                                        <Path Fill="{StaticResource WindowButtonIconFill}"
												Stroke="{StaticResource WindowButtonIconStroke}" Width="14" Height="14"
												Data="M1.5,3.5 L2.5,2.5 4.5,2.5 6.5,4.5 8.5,2.5 10.5,2.5 11.5,3.5 8.5,6.5 8.5,7.5 11.5,10.5 10.5,11.5 8.5,11.5 6.5,9.5 4.5,11.5 2.5,11.5 1.5,10.5 4.5,7.5 4.5,6.5 z" />
                                    </telerik:RadButton>
                                </StackPanel>
                            </Border>

                        </Grid>

                        <Border x:Name="ContentOuterBorder" Grid.Row="1" Margin="{TemplateBinding BorderThickness}"
								BorderThickness="1" BorderBrush="{StaticResource WindowInnerBorder}">
                            <Border x:Name="ContentInnerBorder" BorderThickness="1"
									BorderBrush="{TemplateBinding BorderBrush}"
									Background="{TemplateBinding Background}">
                                <ContentPresenter x:Name="ContentElement" Margin="{TemplateBinding Padding}"
										Content="{TemplateBinding Content}"
										ContentTemplate="{TemplateBinding ContentTemplate}" />
                            </Border>
                        </Border>

                    </Grid>
                </Border>
            </Border>

            <Thumb x:Name="W" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeWE" HorizontalAlignment="Left" />
            <Thumb x:Name="N" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeNS" VerticalAlignment="Top" />
            <Thumb x:Name="E" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeWE"
					HorizontalAlignment="Right" />
            <Thumb x:Name="S" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeNS" VerticalAlignment="Bottom" />
            <Thumb x:Name="NW" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeNWSE" VerticalAlignment="Top"
					HorizontalAlignment="Left" />
            <Thumb x:Name="NE" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeNESW" VerticalAlignment="Top"
					HorizontalAlignment="Right" />
            <Thumb x:Name="SE" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeNWSE"
					VerticalAlignment="Bottom" HorizontalAlignment="Right" />
            <Thumb x:Name="SW" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeNESW"
					VerticalAlignment="Bottom" HorizontalAlignment="Left" />
        </Grid>

    </ControlTemplate>

    <!-- telerikNavigation:RadWindow -->
    <Style x:Key="RadWindowStyle" TargetType="telerikNavigation:RadWindow">
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Background" Value="{StaticResource WindowBackground}" />
        <Setter Property="BorderBrush" Value="{StaticResource WindowOuterBorder}" />
        <Setter Property="BorderBackground" Value="{StaticResource WindowBorderBackground}" />
        <Setter Property="ModalBackground" Value="{StaticResource WindowModalBackground}" />

        <Setter Property="BorderThickness" Value="2 0 2 2" />

        <Setter Property="MinHeight" Value="36" />
        <Setter Property="MinWidth" Value="110" />

        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />

        <Setter Property="Header" Value="RadWindow" />

        <Setter Property="WindowStartupLocation" Value="Manual" />
        <Setter Property="WindowState" Value="Normal" />

        <Setter Property="CaptionHeight" Value="29" />
        <Setter Property="ResizeBorder" Value="8 6 10 10" />

        <Setter Property="Template" Value="{StaticResource RadWindowTemplate}" />


        <Setter Property="TabNavigation" Value="Cycle" />

        <Setter Property="animation:AnimationManager.AnimationSelector">
            <Setter.Value>
                <animation:AnimationSelector>
                    <animation:AnimationGroup AnimationName="Show">
                        <animation:FadeAnimation Direction="In" TargetElementName="LayoutRoot">

                            <animation:FadeAnimation.Easing>
                                <QuarticEase EasingMode="EaseOut" />
                            </animation:FadeAnimation.Easing>

                        </animation:FadeAnimation>
                        <animation:ScaleAnimation Direction="In" TargetElementName="LayoutRoot" MinScale="0.9">

                            <animation:ScaleAnimation.Easing>
                                <QuarticEase EasingMode="EaseOut" />
                            </animation:ScaleAnimation.Easing>

                        </animation:ScaleAnimation>
                    </animation:AnimationGroup>
                    <animation:AnimationGroup AnimationName="Hide">
                        <animation:FadeAnimation Direction="Out" TargetElementName="LayoutRoot">

                            <animation:FadeAnimation.Easing>
                                <QuarticEase EasingMode="EaseOut" />
                            </animation:FadeAnimation.Easing>

                        </animation:FadeAnimation>
                        <animation:ScaleAnimation Direction="Out" TargetElementName="LayoutRoot" MinScale="0.9">

                            <animation:ScaleAnimation.Easing>
                                <QuarticEase EasingMode="EaseIn" />
                            </animation:ScaleAnimation.Easing>

                        </animation:ScaleAnimation>
                    </animation:AnimationGroup>
                </animation:AnimationSelector>
            </Setter.Value>
        </Setter>


    </Style>

    <!-- telerikNavigation:RadPrompt -->
    <Style x:Key="RadPromptStyle" TargetType="telerikNavigation:RadPrompt">
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Width" Value="350" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikNavigation:RadPrompt">
                    <Grid x:Name="LayoutRoot">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <ContentPresenter x:Name="Icon" VerticalAlignment="Top" Margin="16 8 8 8"
								ContentTemplate="{StaticResource ConfirmIconTemplate}" />

                        <StackPanel  x:Name="PromptContent" Grid.Row="0" Grid.Column="1">

                            <ScrollViewer IsTabStop="False" telerik:StyleManager.Theme="{StaticResource Theme}"
									Grid.Row="0" Grid.Column="1" HorizontalScrollBarVisibility="Auto"
									VerticalScrollBarVisibility="Auto" Margin="0 0 0 8">
                                <ContentPresenter x:Name="PromptText" Margin="8 8 8 0" />
                            </ScrollViewer>

                            <TextBox x:Name="PromptTextBox" telerik:StyleManager.Theme="{StaticResource Theme}"
									Margin="8" IsTabStop="True" TabIndex="0"  />
                        </StackPanel>

                        <Border x:Name="HorizontalRule" Grid.Row="1" Grid.ColumnSpan="2" BorderThickness="0 0 0 1"
								Height="2" Background="{StaticResource BorderLineOuterColor}"
								BorderBrush="{StaticResource BorderLineInnerColor}" VerticalAlignment="Top" />

                        <StackPanel x:Name="DialogButtons" Grid.Row="2" Grid.ColumnSpan="2" Orientation="Horizontal"
								HorizontalAlignment="Right">
                            <telerik:RadButton x:Name="OK" 
											   
								
								Command="telerik:WindowCommands.Confirm"
								
									telerikNavigation:RadWindow.ResponseButton="Accept" MinWidth="70" IsTabStop="True"
									TabIndex="1" HorizontalAlignment="Right"
									telerik:LocalizationManager.ResourceKey="Ok" Margin="0 10 8 8"
									telerik:StyleManager.Theme="{StaticResource Theme}" />
                            <telerik:RadButton x:Name="Cancel" 
											   
									
									Command="telerik:WindowCommands.Cancel"
									
									telerikNavigation:RadWindow.ResponseButton="Cancel" MinWidth="70" IsTabStop="True"
									TabIndex="2" HorizontalAlignment="Right"
									telerik:LocalizationManager.ResourceKey="Cancel" Margin="0 10 8 8"
									telerik:StyleManager.Theme="{StaticResource Theme}" />
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="telerikNavigation:RadPrompt" BasedOn="{StaticResource RadPromptStyle}" />

    <!-- telerikNavigation:RadConfirm -->
    <Style x:Key="RadConfirmStyle" TargetType="telerikNavigation:RadConfirm">
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="MinWidth" Value="275" />
        <Setter Property="MaxWidth" Value="500" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikNavigation:RadConfirm">
                    <Grid x:Name="LayoutRoot">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <ContentPresenter x:Name="Icon" VerticalAlignment="Top" Margin="16 8 8 8"
								ContentTemplate="{StaticResource ConfirmIconTemplate}" />

                        <ScrollViewer IsTabStop="False" telerik:StyleManager.Theme="{StaticResource Theme}" Grid.Row="0"
								Grid.Column="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
								Margin="0 0 0 8">
                            <ContentPresenter x:Name="ConfirmText" Margin="8 8 8 0" />
                        </ScrollViewer>

                        <Border x:Name="HorizontalRule" Grid.Row="1" Grid.ColumnSpan="2" BorderThickness="0 0 0 1"
								Height="2" Background="{StaticResource BorderLineOuterColor}"
								BorderBrush="{StaticResource BorderLineInnerColor}" VerticalAlignment="Top" />

                        <StackPanel x:Name="DialogButtons" Grid.Row="2" Grid.ColumnSpan="2" Orientation="Horizontal"
								HorizontalAlignment="Right"  >
                            <telerik:RadButton x:Name="OK" 
								
								Command="telerik:WindowCommands.Confirm"
								
									telerikNavigation:RadWindow.ResponseButton="Accept" MinWidth="70" IsTabStop="True"
									TabIndex="0" HorizontalAlignment="Right"
									telerik:LocalizationManager.ResourceKey="Ok" Margin="0 10 8 8"
									telerik:StyleManager.Theme="{StaticResource Theme}" />
                            <telerik:RadButton x:Name="Cancel" 
											   
									
									Command="telerik:WindowCommands.Cancel"
									 
									telerikNavigation:RadWindow.ResponseButton="Cancel" MinWidth="70" TabIndex="1"
									HorizontalAlignment="Right" telerik:LocalizationManager.ResourceKey="Cancel"
									Margin="0 10 8 8" telerik:StyleManager.Theme="{StaticResource Theme}" />
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="telerikNavigation:RadConfirm" BasedOn="{StaticResource RadConfirmStyle}" />


    <!-- telerikNavigation:RadAlert -->
    <Style x:Key="RadAlertStyle" TargetType="telerikNavigation:RadAlert">
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="MinWidth" Value="275" />
        <Setter Property="MaxWidth" Value="500" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikNavigation:RadAlert">
                    <Grid x:Name="LayoutRoot"   >
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <telerik:CommandManager.InputBindings>
                            <telerik:InputBindingCollection>
                                <telerik:KeyBinding Key="Escape" Command="telerik:WindowCommands.Confirm" />
                            </telerik:InputBindingCollection>
                        </telerik:CommandManager.InputBindings>



                        <ContentPresenter x:Name="Icon" VerticalAlignment="Top" Margin="16 8 8 8"
								ContentTemplate="{StaticResource AlertIconTemplate}" />

                        <ScrollViewer IsTabStop="False" telerik:StyleManager.Theme="{StaticResource Theme}" Grid.Row="0"
								Grid.Column="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
								Margin="0 0 0 8">
                            <ContentPresenter x:Name="AlertText" Margin="8 8 8 0" />
                        </ScrollViewer>

                        <Border x:Name="HorizontalRule" Grid.Row="1" Grid.ColumnSpan="2" BorderThickness="0 0 0 1"
								Height="2" Background="{StaticResource BorderLineOuterColor}"
								BorderBrush="{StaticResource BorderLineInnerColor}" VerticalAlignment="Top" />

                        <telerik:RadButton x:Name="OK" 
										   
							
							Command="telerik:WindowCommands.Confirm"
							
								telerikNavigation:RadWindow.ResponseButton="Accept" Grid.Row="2" Grid.ColumnSpan="2"
								MinWidth="70" IsTabStop="True" TabIndex="0" HorizontalAlignment="Right"
								telerik:LocalizationManager.ResourceKey="Ok" Margin="0 10 8 8"
								telerik:StyleManager.Theme="{StaticResource Theme}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="telerikNavigation:RadAlert" BasedOn="{StaticResource RadAlertStyle}" />




    <!-- RadComboBox-->


    <!--EditableComboBox-->
    <ControlTemplate x:Key="EditableComboBox" TargetType="telerikInput:RadComboBox">

        <Grid x:Name="VisualRoot">

            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Disabled}" />
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity">
                                <LinearDoubleKeyFrame KeyTime="0:0:0.050" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0.050">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderEnabled">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Boolean>False</sys:Boolean>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Duration="0"  Storyboard.TargetName="PART_EditableTextBox" Storyboard.TargetProperty="Opacity" To="0.5" />
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Disabled}" />
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Disabled}" />
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Disabled}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity">
                                <LinearDoubleKeyFrame KeyTime="0:0:0.150" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0.150">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderActive">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Boolean>True</sys:Boolean>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>

                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity">
                                <LinearDoubleKeyFrame KeyTime="0:0:0.115" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_MouseOver}" />
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_MouseOver}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="DropDownOpen">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Pressed}" />
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity">
                                <LinearDoubleKeyFrame KeyTime="0:0:0.050" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0.050">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Pressed}" />
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Pressed}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome"
									Storyboard.TargetProperty="RenderFocused">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Boolean>True</sys:Boolean>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual"
									Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00.150">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Unfocused" />
                </VisualStateGroup>



                <VisualStateGroup x:Name="ValidationStates">
                    <VisualState x:Name="Valid">
                    </VisualState>
                    <VisualState x:Name="InvalidUnfocused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationTooltip"
									Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="InvalidFocused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames
									Storyboard.TargetName="ValidationTooltip"
									Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0.1">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames
									Storyboard.TargetName="ValidationTooltip"
									Storyboard.TargetProperty="IsOpen">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0.15">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Boolean>True</sys:Boolean>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>



                <VisualStateGroup x:Name="WatermarkStates">
                    <VisualState x:Name="WatermarkVisible">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Watermark" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="WatermarkInvisible" />
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>



            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <Border x:Name="Background" Grid.Column="0" IsHitTestVisible="False" Background="{StaticResource PickerBackground_Normal}" CornerRadius="{StaticResource SplitButton_LeftPartCornerRadius}" />
            <Border Grid.ColumnSpan="2" IsHitTestVisible="False" Background="{TemplateBinding Background}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" Margin="1" />
            <Border x:Name="Border" Grid.ColumnSpan="2" IsHitTestVisible="False" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" />
            <Border x:Name="MouseOverVisual" Grid.ColumnSpan="2" IsHitTestVisible="False" BorderBrush="{StaticResource ControlOuterBorder_MouseOver}" BorderThickness="{TemplateBinding BorderThickness}" Opacity="0" Visibility="Collapsed" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" />

            <TextBox x:Name="PART_EditableTextBox"
					Grid.Column="0"
					BorderThickness="0"
					Margin="1 1 0 1"
					BorderBrush="Transparent"
					Padding="{TemplateBinding Padding}"					
					Foreground="{TemplateBinding Foreground}"
					IsReadOnly="{TemplateBinding IsReadOnly}"
					Background="Transparent"
					VerticalAlignment="Center"
					HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
					VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
                <TextBox.Template>
                    <ControlTemplate TargetType="TextBox">
                        <Grid>
                            <ScrollViewer 
									
									
									x:Name="ContentElement"
									
									telerik:StyleManager.Theme="{StaticResource Theme}"
									Padding="{TemplateBinding Padding}"
									BorderBrush="{TemplateBinding BorderBrush}" 
									BorderThickness="{TemplateBinding BorderThickness}"
									Background="{TemplateBinding Background}" 
									IsTabStop="False" 
									VerticalScrollBarVisibility="Auto"
									VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        </Grid>
                    </ControlTemplate>
                </TextBox.Template>
            </TextBox>

            <Border x:Name="FocusVisual" Visibility="Collapsed" Grid.ColumnSpan="2" IsHitTestVisible="False" BorderBrush="{StaticResource ControlOuterBorder_Focused}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" >
                <Border BorderBrush="{StaticResource ControlInnerBorder_Focused}" CornerRadius="{StaticResource SplitButton_SpanInnerCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" />
            </Border>

            <telerik:RadToggleButton x:Name="PART_DropDownButton" Margin="0" Padding="0"
					Grid.Column="1" IsTabStop="False" ClickMode="Press" telerik:StyleManager.Theme="{StaticResource Theme}">

                <telerik:RadToggleButton.Template>
                    <ControlTemplate TargetType="telerik:RadToggleButton">
                        <ContentPresenter />
                    </ControlTemplate>
                </telerik:RadToggleButton.Template>

                <Grid>
                    <telerikChromes:ButtonChrome x:Name="ButtonChrome"
							telerik:StyleManager.Theme="{StaticResource Theme}"
							BorderBrush="{TemplateBinding BorderBrush}"
							BorderThickness="{TemplateBinding BorderThickness}"
							RenderPressed="{TemplateBinding IsDropDownOpen}"
							RenderMouseOver="{Binding IsMouseOver, ElementName=PART_DropDownButton}"
							CornerRadius="{StaticResource SplitButton_RightPartCornerRadius}"
							
							RenderFocused="{TemplateBinding IsFocused}"
							
							 />

                    <ContentControl x:Name="DropDownIcon"
							Grid.Column="1" IsTabStop="False"
							Foreground="{StaticResource ButtonIconForeground_Normal}"
							Background="{StaticResource ButtonIconBackground_Normal}"
							Template="{StaticResource ArrowTemplateEditableCombobox}" />
                </Grid>
            </telerik:RadToggleButton>

            <TextBlock x:Name="Watermark" Text="{TemplateBinding EmptyText}" Opacity=".5" IsHitTestVisible="False" 
					   VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0" Visibility="Collapsed" />


            <telerikChromes:ValidationTooltip x:Name="ValidationTooltip" 
					Grid.ColumnSpan="2" Visibility="Collapsed"
					telerik:StyleManager.Theme="{StaticResource Theme}"
					TooltipPlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" TooltipContent="{Binding Path=(Validation.Errors), RelativeSource={RelativeSource TemplatedParent}}">
            </telerikChromes:ValidationTooltip>


            <Popup x:Name="PART_Popup">
                <Grid x:Name="PopupRoot">

                    <telerikChromes:ShadowChrome telerik:StyleManager.Theme="{StaticResource Theme}" Margin="0 0 0 3" />

                    <Border BorderThickness="{TemplateBinding BorderThickness}"
							BorderBrush="{TemplateBinding BorderBrush}"
							MinWidth="{TemplateBinding MinDropDownWidth}"
							MaxHeight="{TemplateBinding MaxDropDownHeight}"
							Background="{StaticResource PickerPopupBackground}"
							CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
							Margin="0 0 0 3"
						 >

                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>

                            <telerik:RadButton x:Name="PART_ClearButton" Grid.Row="0"
								Margin="-1 -1 -1 0"
								Visibility="{TemplateBinding ClearSelectionButtonVisibility}"
								Content="{TemplateBinding ClearSelectionButtonContent}"
								telerik:StyleManager.Theme="{StaticResource Theme}" />

                            <ScrollViewer x:Name="PART_ScrollViewer" Grid.Row="1"
								Padding="0 1 0 0" BorderThickness="0"
								VerticalScrollBarVisibility="Auto"
                                Foreground="{TemplateBinding Foreground}"
								telerik:StyleManager.Theme="{StaticResource Theme}"
								
								telerik:ScrollViewerExtensions.EnableMouseWheel="True"
								
								 >

                                <ItemsPresenter />

                            </ScrollViewer>
                        </Grid>
                    </Border>
                </Grid>
            </Popup>
        </Grid>

    </ControlTemplate>

    <!--NonEditableComboBox-->

    <ControlTemplate x:Key="NonEditableComboBox" TargetType="telerikInput:RadComboBox">
        <Grid x:Name="VisualRoot">

            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.5" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.5" />
                            </DoubleAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Disabled}" />
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Disabled}" />
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderEnabled">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Boolean>False</sys:Boolean>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderMouseOver">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Boolean>True</sys:Boolean>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_MouseOver}" />
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_MouseOver}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="DropDownOpen">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Pressed}" />
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Pressed}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused" />
                    <VisualState x:Name="Unfocused" />
                </VisualStateGroup>



                <VisualStateGroup x:Name="ValidationStates">
                    <VisualState x:Name="Valid">
                    </VisualState>
                    <VisualState x:Name="InvalidUnfocused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationTooltip"
									Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="InvalidFocused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationTooltip" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationTooltip" Storyboard.TargetProperty="IsOpen">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Boolean>True</sys:Boolean>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>


            </VisualStateManager.VisualStateGroups>


            <Border IsHitTestVisible="False" Background="{TemplateBinding Background}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" />

            <telerik:RadToggleButton x:Name="PART_DropDownButton" Foreground="{TemplateBinding Foreground}" IsTabStop="False" Margin="0" Padding="0" ClickMode="Press"
									 telerik:StyleManager.Theme="{StaticResource Theme}">

                <telerik:RadToggleButton.Template>
                    <ControlTemplate TargetType="telerik:RadToggleButton">
                        <ContentPresenter />
                    </ControlTemplate>
                </telerik:RadToggleButton.Template>

                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>

                    <telerikChromes:ButtonChrome x:Name="ButtonChrome"
							Grid.ColumnSpan="2"
							telerik:StyleManager.Theme="{StaticResource Theme}"
							CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
							BorderBrush="{TemplateBinding BorderBrush}"
							BorderThickness="{TemplateBinding BorderThickness}"
							RenderPressed="{TemplateBinding IsDropDownOpen}"
							RenderFocused="{TemplateBinding IsFocused}"
							 />

                    <Border Grid.ColumnSpan="2" Background="{TemplateBinding Background}" IsHitTestVisible="False" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" Margin="1" />

                    <ContentControl x:Name="DropDownIcon" 
							Grid.Column="1" IsTabStop="False"
							Foreground="{StaticResource ButtonIconForeground_Normal}"
							Background="{StaticResource ButtonIconBackground_Normal}"
							Template="{StaticResource ArrowTemplateNonEditableCombobox}" />

                    <ContentPresenter x:Name="Content"
							Grid.Column="0"
							Margin="{TemplateBinding Padding}"
							IsHitTestVisible="False"
							Content="{TemplateBinding SelectionBoxItem}"
							ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
							HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
							VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                </Grid>
            </telerik:RadToggleButton>



            <telerikChromes:ValidationTooltip x:Name="ValidationTooltip"
					Visibility="Collapsed"
					telerik:StyleManager.Theme="{StaticResource Theme}"
					TooltipPlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" TooltipContent="{Binding Path=(Validation.Errors), RelativeSource={RelativeSource TemplatedParent}}">
            </telerikChromes:ValidationTooltip>


            <Popup x:Name="PART_Popup">
                <Grid x:Name="PopupRoot">

                    <telerikChromes:ShadowChrome telerik:StyleManager.Theme="{StaticResource Theme}" Margin="0 0 0 3" />


                    <Border BorderThickness="{TemplateBinding BorderThickness}"
							BorderBrush="{TemplateBinding BorderBrush}"
							MinWidth="{TemplateBinding MinDropDownWidth}"
							MaxHeight="{TemplateBinding MaxDropDownHeight}"
							Background="{StaticResource PickerPopupBackground}"
							CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
							Margin="0 0 0 3" >
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>

                            <telerik:RadButton x:Name="PART_ClearButton" Grid.Row="0"
								Margin="-1 -1 -1 0"
								Visibility="{TemplateBinding ClearSelectionButtonVisibility}"
								Content="{TemplateBinding ClearSelectionButtonContent}"
								telerik:StyleManager.Theme="{StaticResource Theme}" />

                            <ScrollViewer x:Name="PART_ScrollViewer" Grid.Row="1"
								Foreground="{TemplateBinding Foreground}"
								Padding="0 1 0 0" BorderThickness="0"
								VerticalScrollBarVisibility="Auto"
								telerik:StyleManager.Theme="{StaticResource Theme}"
								
								telerik:ScrollViewerExtensions.EnableMouseWheel="True"
								
								 >

                                <ItemsPresenter />
                            </ScrollViewer>
                        </Grid>
                    </Border>
                </Grid>
            </Popup>
        </Grid>

    </ControlTemplate>

    <!--telerikInput:RadComboBoxItem-->
    <Style x:Key="RadComboBoxItemStyle" TargetType="telerikInput:RadComboBoxItem">
        <Setter Property="MinHeight" Value="19" />
        <Setter Property="Margin" Value="0 -1 0 0" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Padding" Value="3 2" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Center" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikInput:RadComboBoxItem">
                    <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighlightVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity">
                                            <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.33" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Grid>
                            <Border x:Name="HighlightVisual" Visibility="Collapsed" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"  BorderThickness="1" BorderBrush="{StaticResource ControlOuterBorder_Highlighted}" Background="{StaticResource ControlBackground_Highlighted}">
                                <Border BorderThickness="1" CornerRadius="{StaticResource SplitButton_SpanInnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Highlighted}" />
                            </Border>
                            <ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        </Grid>
                    </Border>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="telerikInput:RadComboBoxItem" BasedOn="{StaticResource RadComboBoxItemStyle}" />



    <!--telerikInput:RadComboBox-->
    <Style x:Key="RadComboBoxStyle" TargetType="telerikInput:RadComboBox">
        <Setter Property="Template" Value="{StaticResource NonEditableComboBox}" />
        <Setter Property="EditableTemplate" Value="{StaticResource EditableComboBox}" />
        <Setter Property="NonEditableTemplate" Value="{StaticResource NonEditableComboBox}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="MinHeight" Value="22" />
        <Setter Property="Padding" Value="4 0" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="{StaticResource PickerForeground_Normal}" />
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
        <Setter Property="BorderThickness" Value="1" />


        <Setter Property="UseLayoutRounding" Value="True" />




        <Setter Property="animation:AnimationManager.AnimationSelector">
            <Setter.Value>
                <animation:AnimationSelector>
                    <animation:AnimationGroup AnimationName="Expand">
                        <animation:SlideAnimation Direction="In" SlideMode="Top" TargetElementName="PopupRoot" />
                    </animation:AnimationGroup>
                    <animation:AnimationGroup AnimationName="Collapse">
                        <animation:SlideAnimation Direction="Out" SlideMode="Top" TargetElementName="PopupRoot" />
                    </animation:AnimationGroup>
                </animation:AnimationSelector>
            </Setter.Value>
        </Setter>


    </Style>




    <!-- Dialogs in RadScheduleView-->
    <Style x:Key="RadSchedulerWindowStyle" BasedOn="{StaticResource RadWindowStyle}" TargetType="telerikNavigation:RadWindow" />

    <!-- DurationPicker -->
    <Style x:Key="RadDurationPickerStyle" BasedOn="{StaticResource RadComboBoxStyle}" TargetType="telerikInput:RadComboBox" />

    <Style TargetType="telerik:SchedulerWindow" BasedOn="{StaticResource RadSchedulerWindowStyle}" />
    <Style TargetType="telerik:DurationPicker" BasedOn="{StaticResource RadDurationPickerStyle}" />

</ResourceDictionary>

